MuseSpark
MuseSpark
Models & toolsTools

Image Translator API guide

Image Translator API: Translate visible text inside an image into a selected language while retaining its layout and non-text content. Supply one image and target_language.

Model overview

Translate visible text inside an image into a selected language while retaining its layout and non-text content. Supply one image and target_language.

API integration

DocumentationValue
API invocation identifierimage-translator
IntegrationAsync task API

Use this invocation identifier in API requests. Check your authorized model catalog for access. Follow the Quickstart for your first complete call.

Request parameters

Studio presets describe the form setup, not guaranteed server defaults. Send preset values explicitly to reproduce them.

imagestringNon-nullRequired

Input image whose visible text will be translated while preserving layout and non-text visual content. Use a public HTTP(S) image URL or a complete JPEG, PNG or WebP Data URI; each image must be at most 30 MB.

Media types: image/jpeg, image/png, image/webp.

target_languagestringNon-nullRequired

The target language to translate the text in the image to.

Allowed values (34)

Allowed values: "english", "chinese-simplified", "chinese-traditional", "spanish", "french", "arabic", "hindi", "bengali", "portuguese", "russian", "japanese", "korean", "german", "italian", "dutch", "polish", "turkish", "vietnamese", "thai", "indonesian", "malay", "filipino", "urdu", "persian", "hebrew", "swedish", "danish", "norwegian", "finnish", "greek", "czech", "hungarian", "romanian", "ukrainian".

Studio preset: "english".

No parameters match. Clear the search or reset the filters.

Model rules

  • Use a public HTTP(S) image URL or a complete JPEG, PNG, or WebP Data URI. Each image must be at most 30 MB. Choose target_language from the exact published enum.
  • This item exposes image and target_language only; use those fields rather than a free-form generation prompt.

Integration notes

Use the following field formats and values in MuseSpark requests.

  • image, target_language: Send image and target_language inside parameters. Use the exact language code and image formats shown in this guide.

Request examples

Replace example media URLs and YOUR_... input identifiers with your own valid resources. Examples are checked against the exported item schema; media access and paid execution are separate runtime checks.

Set MUSESPARK_API_KEY and a stable MUSESPARK_REQUEST_ID before submitting. Preserve the request ID for retries of the same request and use a new ID for new work. Python examples use requests; JavaScript examples use Node.js 20 or later. The standalone Quickstart includes task polling and recovery.

Translate a menu image into English

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "image-translator",
  "parameters": {
    "target_language": "english",
    "image": "https://example.com/menu-photo.jpg"
  }
}'

Parameters used: target_language · image.

Translate a poster image into Spanish

curl --fail-with-body 'https://api.musespark.ai/api/v1/openapi/task' \
  -H "Authorization: Bearer $MUSESPARK_API_KEY" \
  -H "X-Idempotency-Key: $MUSESPARK_REQUEST_ID" \
  -H 'Content-Type: application/json' \
  -d '{
  "item_key": "image-translator",
  "parameters": {
    "target_language": "spanish",
    "image": "https://example.com/event-poster.png"
  }
}'

Parameters used: target_language · image.

Output

The intended output is an image with translated visible text, rather than a plain-text translation response.

Creation returns a task ID inside data. Poll that task until completion, then save data.result.output_urls and any data.result.batch_results. See the task lifecycle for terminal states, result retention, and errors.

Troubleshooting

A language name is rejected. Use the exact enum spelling, such as english or chinese-traditional.

target_language

A large or unsupported embedded image is rejected. Use JPEG, PNG, or WebP within 30 MB, and include the full Data URI prefix when embedding data.

image

For rejected inputs, check the field type, accepted values, and conditional requirements in Request parameters and Model rules. Correct the affected fields before submitting again.

If creation times out, preserve the request identity and any known task ID. Follow Errors, timeouts and retries before submitting again.

The public input snapshot was exported on 2026-11-09. Current prices and availability are listed in the model center.