Image Translation
Translate the text inside images and creatives while keeping the design. Analyze, render, review and download.
Image Translation replaces the text in an image with its translation and keeps the layout, fonts and pictures. There are two ways in: one call for a quick translation, or an analysis you can check before anything renders.
Start a job
For one image into one language, call Translate an image with the image as file, the sourceLanguage (or auto) and the targetLanguage. You get a jobId and a translationVersionId back straight away.
To check the plan first, or to translate into several languages, call Analyze an image instead. Send the image as file, a public sourceUrl, or the sourceKey of an image your organization already holds.
Check the analysis
After Analyze an image, poll Get the analysis every 3 to 10 seconds until status is completed. Its data lists every text region it found (text_regions) and the visual elements (elements), such as logos.
Render the translation
Call Translate an analyzed image with one targetLanguage or several targetLanguages. Change wording per region with overrides and swap logos with logoReplacements. Each language returns its own translationVersionId.
Collect it
Poll Get a translation every 5 to 15 seconds until status is completed or failed, then download it or save it to your assets.
Languages
Languages are keys, not ISO codes: for example english_united_states, french_france or hindi_india. Get them from List languages and use each language's name. With a translation memory in tmId, use the languages of that memory: its approved translations are reused, and new ones are stored back.
Fast mode
With fastMode=true, Analyze an image renders every target language as soon as the analysis finishes, with no further call. You can't check the plan first, and the renders are charged when you start the job. Without fast mode, you pay for each render when you call Translate an analyzed image.
Statuses
Get the analysis:
status | Meaning |
|---|---|
analyzing | Still running. Keep polling. |
completed | Done. data holds the plan. |
failed | The analysis failed. Call Retry a failed job. |
direct-translate | The job was made with Translate an image, which has no analysis. |
Get a translation:
status | Meaning |
|---|---|
pending, translating | Still running. Keep polling. |
completed | translatedImageUrl is ready, and translationData holds the source and translated text of each region. |
failed | errorCode and failureReason say why. The AI_* codes are usually worth a retry. |
Review the text
A translation's text is kept per region, keyed by the region ID from the analysis.
- Edit a region's text changes the stored wording. The image is not rendered again; to show the new wording, render with it in
overrides. - Set a region's status marks a region unverified (
u), verified (v) or approved (a). Set the status of several regions does it in one call. - Sync a translation to the TM writes the text and statuses to the job's translation memory. Update a translation from the TM does the reverse.
Edit the image
AI edits change the picture and keep the translated text:
- Edit a masked area: remove, add or replace what is in one area.
- Edit elements with instructions: change single elements, such as "make the red banner dark blue".
- Add an image to the design: place a logo, badge or product shot. Keep reusable images in the overlay library.
- Regenerate with a prompt: one change across the whole image.
- Change the aspect ratio: recreate the image in a new shape, such as
9:16.
An edit with a translationVersionId makes a new translation. An edit without one, a resize, or Re-run the analysis makes a new analysis version, which becomes current; switch back with Make an analysis version current.
Permissions
Each endpoint page lists the permission it needs. The API key needs them on the role of the person who created it.
| Resource | Covers | Actions used |
|---|---|---|
translate_photo.image_translator | Jobs, translations, review, AI edits, analysis versions and the overlay library. | create, delete, export, read, update |
Credits
Analyzing, rendering, re-analyzing, every AI edit and every retry are charged when they start. Without enough credits the API returns 402 and nothing starts. If the work fails on our side, the credits are refunded. Each endpoint that charges says so on its page, with the current rates. Estimate credits prices a batch before you start, and Get a job's credit usage shows what a job cost. See Credits.
To create images, adapt designs to new formats or translate DITA maps, see Image creation and adaptation.