To get started, visit our website to sign up for an account. After registration, you'll be able to view the dashboard and access your API key.
Go to Dashboard and navigate to the API Key section.
Important Security Note
Your API key is automatically generated and available in your account dashboard upon signup. You can also regenerate a new key from your dashboard at any time.
All API requests must be authenticated using a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Parameter | Type | Required | Description |
---|---|---|---|
imageData | string | Yes | The image file you want to translate (e.g. image.png, photo.jpg). |
sourceLanguage | string | Yes | Source language code (e.g., en for English) |
targetLanguage | string | Yes | Target language code (e.g. es for Spanish) |
Important
Always use the language codes (e.g., es
for Spanish, fr
for French, zh-CN
for Chinese Simplified ) in your API requests. The full names are provided for reference only.
ar
Arabicbn
Bengalibg
Bulgarianzh-CN
Chinese (Simplified)zh-HK
Chinese (Traditional)hr
Croatiancs
Czechda
Danishnl
Dutchen
Englishet
Estonianfi
Finnishfr
Frenchde
Germanel
Greekhe
Hebrewhi
Hindihu
Hungarianid
Indonesianit
Italianja
Japanesejv
Javaneseko
Koreanlv
Latvianlt
Lithuanianno
Norwegianpl
Polishpt
Portuguesero
Romanianru
Russiansr
Serbiansk
Slovaksl
Slovenianes
Spanishsw
Swahilisv
Swedishth
Thaitr
Turkishuk
Ukrainianvi
Vietnamesecurl -X POST 'https://PicTranslate.dev/api/translate' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -F 'image=@/path/to/your/image.png' \ -F 'sourceLanguage=en' \ -F 'targetLanguage=es'
{ "status": "success", "message": "Image translated successfully.", "translatedImageUrl": "https://storage.example.com/translated_xyz.png", "creditsDeducted": 1, "currentBalance": 99, "processingTimeMs": 2450 }
{ "status": "failure", "message": "Bad Request: [specific error message]", "error_details": "[detailed error information]" }
Possible reasons: Missing or invalid parameters, unsupported language code.