API Documentation

Complete reference for integrating with the TranslateMyImage API

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

POST
https://translatemyimage.com/api/translate

Required Headers

HeaderValue
Content-Typemultipart/form-data (set automatically by your HTTP client)
X-API-KeyYOUR_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

ParameterTypeDescription
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

StatusDescription
200 OK
Translation completed; one credit is consumed.
400 Bad Request
Invalid input, unsupported format or missing file.
401 Unauthorized
Missing, invalid, or revoked API key when no session is present.
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_request
  • invalid_image
  • plan_required
  • insufficient_credits
  • content_blocked
  • service_unavailable
  • generation_failed
  • unknown

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 Response Payload
{
    "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" }
    }
}