Back to home
API Documentation

Image Translation API

Getting Started

API Key Acquisition
Access your API key from the dashboard

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.

Authentication

All API requests must be authenticated using a Bearer token in the Authorization header.

Authorization Header
Authorization: Bearer YOUR_API_KEY

API Endpoints

POST
/api/translate
Translate text within an image from one language to another while preserving the original layout and style

Request Body

ParameterTypeRequiredDescription
imageDatastring
Yes
The image file you want to translate (e.g. image.png, photo.jpg).
sourceLanguagestring
Yes
Source language code (e.g., en for English)
targetLanguagestring
Yes
Target language code (e.g. es for Spanish)

Supported Languages

40 languages

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.

🇸🇦arArabic
🇧🇩bnBengali
🇧🇬bgBulgarian
🇨🇳zh-CNChinese (Simplified)
🇭🇰zh-HKChinese (Traditional)
🇭🇷hrCroatian
🇨🇿csCzech
🇩🇰daDanish
🇳🇱nlDutch
🇺🇸enEnglish
🇪🇪etEstonian
🇫🇮fiFinnish
🇫🇷frFrench
🇩🇪deGerman
🇬🇷elGreek
🇮🇱heHebrew
🇮🇳hiHindi
🇭🇺huHungarian
🇮🇩idIndonesian
🇮🇹itItalian
🇯🇵jaJapanese
🇮🇩jvJavanese
🇰🇷koKorean
🇱🇻lvLatvian
🇱🇹ltLithuanian
🇳🇴noNorwegian
🇵🇱plPolish
🇵🇹ptPortuguese
🇷🇴roRomanian
🇷🇺ruRussian
🇷🇸srSerbian
🇸🇰skSlovak
🇸🇮slSlovenian
🇪🇸esSpanish
🇹🇿swSwahili
🇸🇪svSwedish
🇹🇭thThai
🇹🇷trTurkish
🇺🇦ukUkrainian
🇻🇳viVietnamese

Example Request

Request
curl -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'

Success Response (200 OK)

Response
{
  "status": "success",
  "message": "Image translated successfully.",
  "translatedImageUrl": "https://storage.example.com/translated_xyz.png",
  "creditsDeducted": 1,
  "currentBalance": 99,
  "processingTimeMs": 2450
}

Error Responses

400 Bad Request
{
  "status": "failure",
  "message": "Bad Request: [specific error message]",
  "error_details": "[detailed error information]"
}

Possible reasons: Missing or invalid parameters, unsupported language code.