API Documentation
The TranslateMyImage API translates the text inside an image and returns a new image, not a list of strings. Send one JPG, PNG or WebP and a target language to a single endpoint; the JSON response links to the translated image, generated to keep the original layout.
New to the API? Read what the image translation API does, with request examples in curl, Python and Node.js.
API Endpoint Details
Submit an image for translation with an active API key. API keys are available from the Pro plan upward. Each completed translation consumes one credit.
Endpoint
https://translatemyimage.com/api/translateRequired Headers
| Header | Value |
|---|---|
| Content-Type | multipart/form-data (set automatically by your HTTP client) |
| X-API-Key | YOUR_API_KEY |
Create your key on the API Keys page. It is shown only once. Send it in the X-API-Key header; API clients do not need a browser session.
Body Requirements
| Parameter | Type | Description |
|---|---|---|
| file | Required File | An image file (JPG, PNG, or WEBP), up to 10 MB and 25 megapixels. |
| target_lang | Required String | The target language code: en, fr, es, de, it, pt, ja, ko, or zh. |
| source_lang | Optional String | The source language code. If omitted, it will be auto-detected. Use 'auto' for the same behavior. |
| quality | Optional String | 'basic' (default) or 'ultra'. |
| business_type | Optional String | 'default', 'marketing', 'edition', or 'technical documentation'. |
| custom_prompt | Optional String | Optional AI instructions, up to 1,000 characters, available from the Pro plan upward. |
Responses
| Status | Description |
|---|---|
200 OK | Translation completed; one credit is consumed. |
202 Accepted | The main model refused this image, so an alternative model translates it, which takes a few minutes. The response holds translation.status: "processing". Call GET /api/translate?id= with the returned translation.id and the same X-API-Key until translations[0].status is completed (one credit is consumed then) or failed; translations[0].metadata.failureCode then gives one of the codes below. |
400 Bad Request | Invalid input, unsupported format or missing file. |
401 Unauthorized | Missing, invalid, or revoked API key when no session is present. |
402 Payment Required | Not enough credits left (code insufficient_credits). Retrying will not help: add credits or wait for the monthly renewal. |
403 Forbidden | API keys require the Pro plan or higher; some translation options also require an eligible plan. |
429 Too Many Requests | The image service is rate limited. Retry later. |
500 Internal Server Error | Processing failed. |
Error responses use JSON with success: false and a message in the error field.
Once the request is authenticated, error responses also include a stable code field, so your integration can react without parsing the English message:
invalid_requestinvalid_imageplan_requiredinsufficient_creditscontent_blockedservice_unavailablegeneration_failedunknown
Authentication errors (missing, invalid or revoked API key, or an account without API access) have no code.
API Call Example
Select your preferred programming language to view the implementation example
curl -X POST https://translatemyimage.com/api/translate \
-H "X-API-Key: YOUR_API_KEY" \
-F "file=@/path/to/image.jpg" \
-F "target_lang=en" \
-F "source_lang=auto"Response Format
The API returns a JSON object containing the translation results and URLs.
{
"success": true,
"translation": {
"id": "clxb1234567890",
"originalUrl": "https://storage.com/original.jpg",
"translatedUrl": "https://storage.com/translated.jpg",
"sourceLang": "fr",
"targetLang": "en",
"status": "completed",
"createdAt": "2026-09-21T15:27:39.000Z",
"metadata": { "quality": "basic", "model": "muse-image" }
}
}