v1.0.0OpenAPI 3.1.1

Document Translation API

Download OpenAPI Document

Translate 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.

Server
{{API_BASE_URL}}
Your API environment
Authentication RequiredApiKeyAuth
Your organization API key (starts with `uvk_`). Create one in the Universe app under Settings → API keys.
x-api-key:
Client Libraries
Shell

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

Translate a document

Auth Required

Start translating one document, or plain text, into one target language through your translation memory. Send multipart/form-data (or JSON, without a file part) with format, sourceLanguage, targetLanguage, suite, tmId and the source: the file part (up to 10 MB), an uploadKey from Get a text file upload URL (the text formats, up to 25 MB), an assetId from your assets, an objectKey from Get an upload URL (any file over 10 MB: Office, PDF and InDesign files up to 500 MB, the text formats up to 25 MB), or sourceText for TEXT. Returns the translation id straight away with status: processing; poll Get a translation until status is COMPLETED or FAILED (for TEXT, Get a text result), then Download the translated file. For more languages, call it once per language with the same objectKey or uploadKey: the upload is read and left in storage.

Permission: playground.document:create. An API key acts with the role of the member who created it. With assetId, also asset:read.

Credits: Charged when the translation starts: the billable source words (see Count billable words) times the rate of the format. When it finishes, the charge is settled on the words actually translated. Refunded in full if the translation fails on our side; deleting it while it runs keeps the charge. Refused with 402 while your organization owes credits.

Rate What it covers Price
Text translation Translating plain text in the playground. Charged per source word. 0.5 credits per word
JSON translation Translating a JSON file in the playground. Charged per source word. 0.5 credits per word
XML translation Translating an XML file in the playground. Charged per source word. 0.5 credits per word
HTML translation Translating an HTML file in the playground. Charged per source word. 0.5 credits per word
XLIFF translation Translating an XLIFF file in the playground. Charged per source word. 0.5 credits per word
Word translation Translating a Word (.docx) file in the playground. Charged per source word. 0.5 credits per word
PowerPoint translation Translating a PowerPoint (.pptx) file in the playground. Charged per source word. 0.5 credits per word
Excel translation Translating an Excel (.xlsx) file in the playground. Charged per source word. 0.5 credits per word
CSV translation Translating a CSV file in the playground. Charged per source word, for the columns selected. 0.5 credits per word
PDF translation Translating a PDF in the playground, keeping its layout. Charged per source word. 0.5 credits per word
InDesign translation Translating an InDesign (.idml) file in the playground, keeping its layout and styles. Charged per source word. 0.5 credits per word
DITA translation Translating a DITA topic or map in the playground, keeping its structure and markup. Charged per source word. 0.5 credits per word
Markdown translation Translating a Markdown (.md) file in the playground, keeping its formatting, links and code. Charged per source word. 0.5 credits per word
YAML translation Translating the text values of a YAML (.yaml, .yml) file in the playground, keeping its keys and structure. Charged per source word. 0.5 credits per word

Bodyrequiredmultipart/form-data

formatstringrequired

Format of the source. TEXT translates sourceText (or an uploaded .txt file); every other format needs a file: the file part, an assetId, an uploadKey for the text formats or, for DOCX, PPTX, XLSX, PDF and IDML, an objectKey.

Enum values:TEXTJSONXMLXLIFFHTMLPPTXDOCXXLSXCSVPDFIDMLDITAMARKDOWNYAMLTABLEAU
Example: DOCX
sourceLanguagestringrequired

Language of the source, as a code your translation memory uses (BCP 47, for example en-US).

Example: en-US
targetLanguagestringrequired

Language to translate into, as a code your translation memory uses (BCP 47, for example hi-IN). One per request: call again for each further language.

Example: hi-IN
tmIdstringrequired

Translation memory to use: matches are reused, the rest is machine translated, and the new translations are stored back in it. Required. It must be one your organization owns or that is shared with it.

Example: 5c8d2e1f-9a3b-4c6d-8e7f-1a2b3c4d5e6f
translateFirstRowboolean

XLSX only. Translate the first row of each sheet (default true). Send false to leave column headings exactly as they are.

Example: true
translateNotesboolean

PPTX only. Also translate the speaker notes under each slide (default false). Their words are counted and charged with the slides.

Example: true
translateImagesboolean

DOCX / PPTX / XLSX / PDF only. Also translate the text inside the document's pictures (default false). Charged per picture; translate/word-count returns how many.

Example: false
imageIdsstring[]

With translateImages: the pictures to translate, by the ids translate/images returns. Send the field once per id, or one comma-separated value. Omit it to translate the pictures that have text in them (checked for free).

translateColumnsnumber[]

CSV only. Which columns to translate, counted from 0. Send the field once per column, or one comma-separated value (0,2). Omit it to translate every column; only the chosen columns are counted and charged.

Example: [0,2]
suitestring

Optional label for where the request comes from, stored on the translation and shown in lists. Any text up to 40 characters; defaults to WEB.

Default: WEBExample: WEB
projectIdstring · uuid

Project to file this translation under; omit for none. See List projects.

Example: 4e7a1b9c-3d2f-4c8e-9a6b-0d1c2b3a4f5e
sourceTextstring

Text to translate, up to 10,000 characters. Required for TEXT unless you upload a .txt file instead. Ignored for every other format.

Example: Welcome to our website.
sourceFileNamestring

TEXT only. Name of the .txt file sourceText was read from, if any. Stored on the translation; omit for typed text.

Example: chapter-01.txt
namestring

Display name of the translation. Defaults to the file name (for TEXT, to Text · <source> → <target>).

Example: Q3 review (Hindi)
assetIdstring · uuid

Translate a file already in your organization's assets instead of uploading one. Needs the asset:read permission too. When file is also sent, file wins. Ignored for TEXT.

Example: 9e4b7c2a-1d5f-4a8e-b3c6-0f1e2d3c4b5a
objectKeystring

The objectKey from Get an upload URL, once you have PUT the file to its uploadUrl. For DOCX, PPTX, XLSX, PDF and IDML up to 500 MB. Use it instead of file and assetId. Send the same key again to translate the file into another language.

Example: 0f8e2d4c-6b1a-4c9e-8d7f-3a2b1c0d9e8f/playground/document/upload/4b1c7e2a-9d3f-4e5a-8b6c-1d2e3f4a5b6c.pptx
objectFileNamestring

File name for an objectKey upload, so the translation and its download are named after your document. Without it the name is document.

Example: quarterly-review.pptx
uploadKeystring

The uploadKey from Get a text file upload URL, once you have PUT the file to its uploadUrl: a .txt (for TEXT), JSON, XML, XLIFF, HTML, Markdown, YAML, DITA, Tableau or CSV file up to 25 MB, sent as JSON in place of the file part. Count billable words, List a document’s pictures and Translate a document read it and leave it in storage: send the same key again for each further target language. It is deleted a day after its upload URL was issued.

Example: 0f8e2d4c-6b1a-4c9e-8d7f-3a2b1c0d9e8f/staged-uploads/7b9e2c4d-1a3f-4e5b-8c6d-9e0f1a2b3c4d.json
sourceKeystring

Count only (word-count and the pictures preview): a file already stored in your organization, such as a document uploaded for a workflow run, read by its storage key. Never used to start a translation.

Example: 3f1c…/cosmos/54052217-…-pictures_test.docx
autoQeboolean

Run a QE report (AI quality evaluation) on the translation as soon as it finishes. Needs the aiqe:create permission (403 otherwise, before anything is charged) and a VitraTM memory — with a Phrase memory the translation runs and the report is skipped. The report is charged separately, per source word evaluated, when it starts; without enough credits it is skipped and the translation kept. When the organization requires Auto QE (Organization settings), the report runs whatever this field says.

Example: false
qeScopestring

With autoQe: evaluate only the segments still awaiting review (unverified, the default — cheaper, the score covers part of the document) or every segment (all).

Enum values:unverifiedall
Example: unverified
filestring · binary

The file to translate, up to 10 MB, with its extension in the file name. Required unless you send assetId, objectKey or uploadKey, or sourceText for TEXT (a .txt file also works for TEXT). For a larger file, use Get an upload URL and objectKey; to keep a text file out of the request, use Get a text file upload URL and send uploadKey as JSON.

Responses

201The translation was created and started.
application/json
idstring · uuidrequired

ID of the translation. Poll Get a translation (or, for TEXT, Get a text result) with it.

Example: 7d3e9a41-2c5b-4f6e-9a1d-8b2c3d4e5f60
statusstringrequired

Always RUNNING: the translation runs in the background. Poll it until it is COMPLETED or FAILED.

Enum values:RUNNING
Example: RUNNING
400Nothing was started. A field failed validation, or: - `File is required for this format`: send `file`, `uploadKey`, `assetId` or `objectKey`. - `Provide sourceText or upload a .txt file to translate.` (`TEXT`), `The uploaded .txt file is empty.`, `Only .txt files are supported for text translation.` - `Text translations are limited to 10,000 characters — …` (`TEXT`). - `A translation memory is required to translate.` or `The selected translation memory is not available to this organization.` - `The upload could not be found. Please try uploading the file again.` or `The upload did not complete. Please try uploading the file again.`: the `objectKey` or `uploadKey` was not uploaded, or not with the declared `size`. - `That upload was already used. Please upload the file again.`: an `uploadKey` whose file was refused before (a program, or not the file it says it is). - `That upload does not belong to this organization.` - `PDF translation into <language> is not supported yet …`: no font for the target script. - `"<name>" is larger than the <n> MB limit` for an `assetId`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
401The `x-api-key` header is missing, or the key is invalid, expired or deleted.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
402Not enough credits for the counted words, or your organization owes credits. Nothing was created or started.
application/json
statusCodenumberrequired

HTTP status code.

Example: 402
errorstringrequired

Always InsufficientCredits.

Example: InsufficientCredits
messagestringrequired

What happened, in plain words.

Example: You don't have enough credits to start this. It needs 120; you have 45.
requirednumberrequired

Credits this request needs.

Example: 120
availablenumberrequired

Credits your organization can spend now.

Example: 45
owednumberrequired

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.

Example: 0
403The key lacks the permission, or `asset:read` for an `assetId` (`PermissionDenied`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
404`assetId` is not an asset in your organization (`Asset not found`), or `projectId` is not a project in it (`Project not found`).
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
413The `file` part is larger than 10 MB. Use Get an upload URL for any larger file and send its `objectKey`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
429Too many requests for this key. Wait the number of seconds in `Retry-After`, then retry.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
500Something failed on our side. Retry with backoff; if it persists, contact support with the `X-Request-Id`.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
502The translation memory service returned an error (`TranslationServiceError`). Retry later.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
503A PDF is still being read or rendered (`This PDF is still being read. Please try again in a moment.`, `PdfStillPreparing`), or several PDFs are already being prepared for your organization (`PdfEngineBusy`). Nothing was charged. Retry after `retryAfterSeconds` (10). Also returned when the translation memory service is unavailable.
application/json
statusCodeintegerrequired

HTTP status code, repeated in the body.

Example: 404
messagestring | string[]required

What went wrong, for people. Validation failures list one entry per problem. Do not branch on this text.

Example: Booking not found
errorstring

Short name of the status.

Example: Not Found
POST/v1/galaxy/playground/document/translate
curl '{{API_BASE_URL}}/v1/galaxy/playground/document/translate' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'translateFirstRow=true' \
  --form 'translateNotes=true' \
  --form 'translateImages=false' \
  --form 'imageIds=string' \
  --form 'translateColumns=0' \
  --form 'translateColumns=2' \
  --form 'format=DOCX' \
  --form 'sourceLanguage=en-US' \
  --form 'targetLanguage=hi-IN' \
  --form 'suite=WEB' \
  --form 'tmId=5c8d2e1f-9a3b-4c6d-8e7f-1a2b3c4d5e6f' \
  --form 'projectId=4e7a1b9c-3d2f-4c8e-9a6b-0d1c2b3a4f5e' \
  --form 'sourceText=Welcome to our website.' \
  --form 'sourceFileName=chapter-01.txt' \
  --form 'name=Q3 review (Hindi)' \
  --form 'assetId=9e4b7c2a-1d5f-4a8e-b3c6-0f1e2d3c4b5a' \
  --form 'objectKey=0f8e2d4c-6b1a-4c9e-8d7f-3a2b1c0d9e8f/playground/document/upload/4b1c7e2a-9d3f-4e5a-8b6c-1d2e3f4a5b6c.pptx' \
  --form 'objectFileName=quarterly-review.pptx' \
  --form 'uploadKey=0f8e2d4c-6b1a-4c9e-8d7f-3a2b1c0d9e8f/staged-uploads/7b9e2c4d-1a3f-4e5b-8c6d-9e0f1a2b3c4d.json' \
  --form 'sourceKey=3f1c…/cosmos/54052217-…-pictures_test.docx' \
  --form 'autoQe=false' \
  --form 'qeScope=unverified' \
  --form 'file=@file.pdf'
{
  "id": "7d3e9a41-2c5b-4f6e-9a1d-8b2c3d4e5f60",
  "status": "RUNNING"
}

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

Models

BatchDetailResponseDto
BatchListResponseDto
BatchStartFileDto
BatchStartResponseDto
BulkUpdatePlaygroundVerificationDto
BulkVerifyResponseDto
CosmosRunRefDto
CreateDocumentUploadPresignDto
CreateStagedUploadDto
DocumentImagePreviewDto
DocumentImagesPreviewResponseDto
DocumentImagesSummaryDto
DocumentUploadUrlResponseDto
FolderPreviewFileDto
FolderPreviewResponseDto
FolderPreviewTotalsDto
FolderRefDto
FolderRunBatchDto
FolderRunDto
FolderRunFailureDto
FolderRunResponseDto
FolderSkippedFileDto
InsufficientCreditsErrorDto
LogAssigneeDto
LogDetailConsumedDto
LogDetailDto
LogDetailResponseDto
LogImageDto
LogImagesResponseDto
LogListConsumedDto
LogListItemDto
LogListResponseDto
LogOwnerDto
LogTmDto
LogVerificationCountsDto
PdfUnreadablePageDto
PlaygroundBatchFileDto
PlaygroundBatchSummaryDto
PlaygroundSyncFromTmResponseDto
PlaygroundSyncToTmResponseDto
RenameDitaPackageDto
RenameLogResponseDto
RenamePlaygroundLogDto
SavePlaygroundOutputToAssetsDto
SaveToAssetsResponseDto
SegmentCountsDto
SegmentDto
SegmentLocationDto
SegmentPaginationDto
SegmentsResponseDto
StagedUploadTicketDto
SyncPlaygroundToTmDto
TextResultDto
TextResultResponseDto
TranslateBatchFormDto
TranslateDocumentFormDto
TranslateLogImagesDto
TranslationStartedResponseDto
UpdatePhraseResponseDto
UpdatePlaygroundPhraseDto
UseEditedLogImageFormDto
WordCountResponseDto