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

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

Auth Required

Translate up to 20 files of one format into one target language in one call. Send multipart/form-data with the files (repeat files) and/or assetIds, or JSON with uploadKeys from Get a text file upload URL and/or assetIds, plus format, sourceLanguage, targetLanguage, suite and tmId. Every file becomes its own translation, grouped in a batch. Returns once the files are queued: each file is processing with its logId, or failed with the reason it could not be queued. The uploadKeys are read and left in storage, so the same keys start the batch for another target language. Follow progress with Get a batch, or each file with Get a translation.

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

Credits: Charged up front for every file that can be queued, on its billable words, all or nothing (402 and nothing created when short). A file that cannot be queued is not charged. Each translation is settled on the words actually translated when it finishes; one that fails on our side is refunded on its own. 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 every file in the batch. TEXT means a batch of .txt files; to translate typed text, use Translate a document.

Enum values:TEXTJSONXMLXLIFFHTMLPPTXDOCXXLSXCSVPDFIDMLDITAMARKDOWNYAMLTABLEAU
Example: JSON
sourceLanguagestringrequired

Language of the files, as a code your translation memory uses (BCP 47).

Example: en-US
targetLanguagestringrequired

Language to translate every file into, as a code your translation memory uses (BCP 47).

Example: hi-IN
tmIdstringrequired

Translation memory every file uses: matches are reused, the rest is machine translated and stored back in it. Required.

Example: 5c8d2e1f-9a3b-4c6d-8e7f-1a2b3c4d5e6f
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
namestring

Name of the batch. Defaults to the file count and format, for example 3 JSON files.

Example: Website launch
assetIdsstring[]

Files already in your organization's assets to add to the batch, alongside or instead of files. Repeat the field once per asset. Needs the asset:read permission too. Not accepted for DOCX, PPTX, XLSX, PDF or IDML (400): upload those, or translate them one at a time.

Example: ["9e4b7c2a-1d5f-4a8e-b3c6-0f1e2d3c4b5a"]
objectKeysstring[]

Keys from Get an upload URL for files to add to the batch, alongside or instead of files (repeat the field once per file). Text formats only (JSON, XML, XLIFF, HTML, CSV, Markdown, YAML, Tableau); each must have been uploaded as this batch’s format.

objectFileNamesstring[]

The original file names of objectKeys, in the same order (repeat the field once per key). A missing name falls back to the format.

uploadKeysstring[]

The uploadKeys from Get a text file upload URL, one per file, once each PUT has finished: send them as JSON in place of the files parts. Counted against the same 20 files as files and assetIds. The batch reads them and leaves them in storage: send the same keys to translate the files into another language.

projectIdstring · uuid

Project to file every translation of the batch under; omit for none. See List projects.

Example: 4e7a1b9c-3d2f-4c8e-9a6b-0d1c2b3a4f5e
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
translateImagesboolean

DOCX / PPTX / XLSX / PDF only. Also translate the text inside each file's pictures (default false). Charged per picture, with the batch.

Example: false
filesstring · binary[]

The files to translate, all of format. Repeat the files field once per file. Up to 20 files counting assetIds, uploadKeys and objectKeys, each up to 10 MB (send larger ones as uploadKeys or objectKeys). Optional when you send assetIds, uploadKeys or objectKeys.

Responses

201The batch was created and its files queued.
application/json
batchIdstring · uuidrequired

ID of the new batch. Read it with Get a batch.

Example: 2a6f1c8e-4b3d-4e9a-8c7b-5d1e2f3a4b5c
namestringrequired

Name of the batch: the name you sent, or one made from the file count and format.

Example: 3 JSON files
statusstringrequired

RUNNING when at least one file was queued; FAILED when none was.

Enum values:RUNNINGFAILED
Example: RUNNING
totalnumberrequired

Files received.

Example: 3
queuednumberrequired

Files queued for translation.

Example: 3
rejectednumberrequired

Files that could not be queued.

Example: 0
filesBatchStartFileDto[]required

One entry per file, in upload order (uploads first, then Drive assets).

Show child attributes
fileNamestringrequired

Name of the uploaded file or Drive asset.

Example: en-US.json
formatstringrequired

Format, lower-case.

Enum values:textjsonxmlxliffhtmlpptxdocxxlsxcsvpdfidmlditamarkdownyamltableau
Example: json
statusstringrequired

RUNNING: queued, poll its translation with logId. FAILED: could not be queued (see error); it is not charged.

Enum values:RUNNINGFAILED
Example: RUNNING
logIdstring · uuid

ID of the translation for this file. Only when RUNNING.

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

Why the file could not be queued. Only when FAILED.

Example: The uploaded .txt file is empty.
400Nothing was started. A field failed validation, or: `At least one file is required.`, `Too many files — a batch accepts at most 20.`, `<format> files cannot be batched from the Drive yet — upload them instead.`, `PDF translation into <language> is not supported yet …`, a translation memory your organization cannot use, or an `uploadKeys` entry that was not uploaded, or not completely (`The upload could not be found. Please try uploading the file again.`, `The upload did not complete. Please try uploading the file again.`).
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. With `assetIds`, also `asset:read`.
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
404An `assetIds` entry 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
413A `files` part is larger than 10 MB. Upload larger files with Get an upload URL and send them as `objectKeys`.
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
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).
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/batch
curl '{{API_BASE_URL}}/v1/galaxy/playground/document/translate/batch' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'format=JSON' \
  --form 'sourceLanguage=en-US' \
  --form 'targetLanguage=hi-IN' \
  --form 'suite=WEB' \
  --form 'tmId=5c8d2e1f-9a3b-4c6d-8e7f-1a2b3c4d5e6f' \
  --form 'name=Website launch' \
  --form 'assetIds=9e4b7c2a-1d5f-4a8e-b3c6-0f1e2d3c4b5a' \
  --form 'objectKeys=string' \
  --form 'objectFileNames=string' \
  --form 'uploadKeys=string' \
  --form 'projectId=4e7a1b9c-3d2f-4c8e-9a6b-0d1c2b3a4f5e' \
  --form 'autoQe=false' \
  --form 'qeScope=unverified' \
  --form 'translateImages=false' \
  --form 'files=@files.pdf'
{
  "batchId": "2a6f1c8e-4b3d-4e9a-8c7b-5d1e2f3a4b5c",
  "name": "3 JSON files",
  "status": "RUNNING",
  "total": 3,
  "queued": 3,
  "rejected": 0,
  "files": [
    {
      "fileName": "en-US.json",
      "format": "json",
      "status": "RUNNING",
      "logId": "7d3e9a41-2c5b-4f6e-9a1d-8b2c3d4e5f60",
      "error": "The uploaded .txt file is empty."
    }
  ]
}

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