Document Translation API
Download OpenAPI DocumentTranslate Office documents one at a time or in batches, with their layout kept intact.
Translate Word, PowerPoint, Excel, CSV, PDF and InDesign files, structured text files (JSON, XML, HTML, XLIFF) and plain text, keeping each document's layout and formatting. Every translation runs through one of your translation memories: matches are reused, the rest is machine translated and stored back. New here? Read Document Translation for the whole flow.
Every request
Send your organization API key in the x-api-key header; it starts with uvk_. Create one in the Universe app under Settings → API keys. The key and organization limits count requests over a rolling minute. See Authentication and Rate limits.
The usual flow: send the file with Translate a document (for a file over 25 MB, first get an upload URL), poll Get a translation until status is DONE, then download the translated file. Each call translates into one language; call it again for each further language, or translate many files at once with Translate a batch of files.
Translations run in the background, so every call returns straight away. They are charged per source word when they start: Count billable words first if you want the count, and see the current rates on Translate a document. Without enough credits you get 402 and nothing is created. See Credits.
Uploads
Files up to 25 MB go straight into Translate a document as the file part. For a Word, PowerPoint, Excel, PDF or InDesign file up to 500 MB, get a presigned upload URL, PUT the file to it, and translate it by its objectKey.
Get an upload URL
Get a text file upload URL
Get an edited picture upload URL
Translations
A translation is one document (or one piece of text) in one target language. Start it, poll it until it is DONE or FAILED, and retry, rename or delete it.
- POST/v1/galaxy/playground/document/translate
- POST/v1/galaxy/playground/document/translate/word-count
- GET/v1/galaxy/playground/document/logs/{id}
- GET/v1/galaxy/playground/document/logs/{id}/text-result
- GET/v1/galaxy/playground/document/logs
- POST/v1/galaxy/playground/document/logs/{id}/retry
- POST/v1/galaxy/playground/document/logs/{id}/restart
- PUT/v1/galaxy/playground/document/rename
- POST/v1/galaxy/playground/document/translate/images
Translate a document
Count billable words
Get a translation
Get a text result
List translations
Retry a failed translation
Restart a stalled translation
Rename a translation
List a document's pictures
Batches
Translate many files in one call: up to 20 uploaded files into one language, or every matching file in a folder of your assets into several languages. Each file becomes its own translation, grouped in a batch you can follow. These endpoints must be turned on for your organization.
Translate a batch of files
Get a batch
List batches
Preview a folder translation
Translate a folder
Results
Download a finished translation in its original format, or save it to your organization's assets. The file is rebuilt on every call, so it includes the latest edits.
- GET/v1/galaxy/playground/document/logs/{id}/export
- POST/v1/galaxy/playground/document/logs/{id}/save-to-assets
- GET/v1/galaxy/playground/document/logs/{id}/images
- POST/v1/galaxy/playground/document/logs/{id}/images/translate
- PUT/v1/galaxy/playground/document/logs/{id}/images/{imageId}/edited
- POST/v1/galaxy/playground/document/logs/{id}/images/{imageId}/revert
Download the translated file
Save to your assets
List pictures
Translate pictures
Translate chosen pictures of a COMPLETED translation, with its translation memory. Each runs on its own and goes into the download once it is translated; poll List pictures for its status. A picture translated before is translated again, and keeps its earlier copy if that does not work.
Permission: playground.document:update. An API key acts with the role of the member who created it.
Credits: Charged when you send the request, one picture each (402 charges and starts nothing). A picture found to have no text, or nothing to change, is charged the analysis rate instead; one that fails on our side is refunded.
| Rate | What it covers | Price |
|---|---|---|
| Text inside a document image | Translating the text inside a picture of a Word, PowerPoint, Excel or PDF file, when "Translate text inside images" is on. Charged per picture, at the Image Translator rate. | 350 credits per image |
| Document image with no text | A document picture that was checked for text and had none to translate: charged the analysis only, and left as it was. | 50 credits per image |
Path Parameters
Translation ID: the id returned by Translate a document (or listed by List translations).
Bodyrequiredapplication/json
The pictures to translate, by the ids List pictures returns (at most 50). Each is charged one picture.
Responses
201The pictures, the chosen ones now `running`.
Show child attributes
Picture ID.
translated: the download carries the translated copy. no_text / unchanged: nothing to redraw. skipped: not translated, for reason. failed: left as it was, not charged.
The texts it carried and what each became.
It can be translated now with Translate pictures.
The editor the picture in the document was last replaced from (Use an edited picture); null for the automatic translation or the original.
It can be opened in an editor and put back with Use an edited picture now.
It shows a translated or edited copy, which Revert a picture can take back to the original.
Storage keys an editor starts from (null unless canEdit): original — Image Translator translates it again — and current, the picture as the translated document shows it now — Magic Layers edits that.
400A path parameter is not a UUID (`Validation failed (uuid is expected)`). Or: `Pictures can be translated once the translation has finished.`, `This translation has no translation memory to take the text from.`, `A scanned page cannot be translated as a picture.`, `This picture cannot be translated: its format cannot be redrawn.`
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
402Not enough credits for the counted words, or your organization owes credits. Nothing was created or started.
HTTP status code.
Always InsufficientCredits.
What happened, in plain words.
Credits this request needs.
Credits your organization can spend now.
Credits your organization owes from earlier jobs (0 when nothing is owed). While anything is owed, every paid request is refused until it is repaid.
403Not allowed: the API key's role lacks the permission (`PermissionDenied`), the product is not enabled for your organization, or it has been turned off.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
404No translation with this ID in your organization (`Playground log not found`), or the key's role sees only its own work and this translation is not its own (`Process not found`). Or `Picture not found`.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
409`This picture is already being translated.`
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
HTTP status code, repeated in the body.
What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.
Short name of the status.
curl '{{API_BASE_URL}}/v1/galaxy/playground/document/logs/7d3e9a41-2c5b-4f6e-9a1d-8b2c3d4e5f60/images/translate' \
--request POST \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"imageIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
}'{
"images": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"position": 0,
"status": "pending",
"reason": "string",
"mimeType": "image/png",
"width": 1.5,
"height": 1.5,
"pages": [
1.5
],
"texts": [
{
"source": "Sign up",
"target": "S'inscrire"
}
],
"sourceUrl": "string",
"translatedUrl": "string",
"hasText": true,
"canTranslate": true,
"editedWith": "image_translator",
"editedAt": "2026-01-15T09:30:00Z",
"canEdit": true,
"canRevert": true,
"editKeys": {
"original": "<orgId>/playground/<logId>/doc-images/<imageId>/source.png",
"current": "<orgId>/playground/<logId>/doc-images/<imageId>/translated.png"
}
}
],
"operation": "translate_document_image"
}Use an edited picture
Revert a picture
Editing
Review a translation segment by segment: read the source and translated text, correct it, mark segments verified or approved, and keep the result in sync with your translation memory.
- GET/v1/galaxy/playground/document/logs/{id}/segments
- PUT/v1/galaxy/playground/document/update-phrase
- PUT/v1/galaxy/playground/document/bulk-verify-phrases
- PUT/v1/galaxy/playground/document/sync-to-tm
- PUT/v1/galaxy/playground/document/sync-from-tm
- GET/v1/galaxy/playground/document/logs/{id}/segments/{ordinal}/translation-origin
List segments
Edit a segment
Set review status
Sync edits to the translation memory
Update from the translation memory
Explain a segment translation
DITA maps
- POST/v1/galaxy/playground/document/packages/upload/presign
- POST/v1/galaxy/playground/document/packages/quote
- POST/v1/galaxy/playground/document/packages
- GET/v1/galaxy/playground/document/packages
- GET/v1/galaxy/playground/document/packages/{id}
- PATCH/v1/galaxy/playground/document/packages/{id}
- GET/v1/galaxy/playground/document/packages/{id}/export
- GET/v1/galaxy/playground/document/packages/{id}/file