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

Get a batch

List batches

Preview a folder translation

Auth Required

See what Translate a folder would do with the same body: every file of the chosen formats under a folder of your assets (and its subfolders, unless includeSubfolders is false), each with its word count, the files it would skip and why, and the credits for all target languages next to your balance. Nothing is started or charged. A run takes at most 200 files.

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

Bodyrequiredapplication/json

formatsstring[]required

Formats to translate, picked by file extension (TEXT is .txt, DITA takes .dita, .ditamap and .bookmap, XLIFF also .xlf, MARKDOWN .md and .markdown, YAML .yaml and .yml). Files of other types are skipped. Several can be combined in one run.

Enum values:TEXTJSONXMLDITAHTMLXLIFFDOCXPPTXXLSXCSVMARKDOWNYAMLPDFIDML
Example: ["DOCX","PPTX"]
sourceLanguagestringrequired

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

Example: en-US
targetLanguagesstring[]required

Languages to translate into (BCP 47), at most 10. Each file is translated into each one: one translation per file and language. The source language and duplicates are dropped.

Example: ["hi-IN","bn-BD"]
tmIdstring · uuidrequired

Translation memory every translation uses. It must be one your organization owns or that is shared with it.

Example: 5c8d2e1f-9a3b-4c6d-8e7f-1a2b3c4d5e6f
folderIdstring · uuid

The folder in your organization's assets (Drive) to translate. Send this or assetIds.

Example: 6b2e8d4f-1a3c-4e5b-9d7f-2c1b0a9e8d7c
assetIdsstring · uuid[]

Instead of a folder: the files to translate, picked in your assets (files of different formats can be mixed; each is translated by its own format). Listed again when you call this, so a file deleted meanwhile is left out. The output folder sits next to the files' folder.

Example: ["8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"]
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
includeSubfoldersboolean

Include files in subfolders (default true).

Default: trueExample: true
excludestring[]

Files to skip, as gitignore-style patterns (at most 20): config*.json matches at any depth, web/*.json only in web, **/fixtures/** a whole subtree.

Example: ["config*.json"]
layoutstring

How translations are laid out in the output folder: language-folder (hi-IN/emails/welcome.json, the default) or language-suffix (emails/welcome.hi-IN.json).

Enum values:language-folderlanguage-suffix
Example: language-folder
projectIdstring · uuid

Project to file every translation of the run under; omit for none. See List projects. Not related to folderId (the Drive folder).

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

The totals.credits of the preview you approved. When sent, a run that now costs a different amount (files added, removed or changed since the preview) is refused with 409 and nothing is charged.

Example: 4380Min: 0
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

Also translate the text inside the pictures of the folder's DOCX / PPTX / XLSX / PDF files (default false). Charged per picture per language; the preview counts them.

Example: false

Responses

201What the run would translate and skip, and what it would cost.
application/json
folderFolderRefDtorequired

The folder you picked.

Show child attributes
idstring · uuidrequired

Folder ID.

Example: 6b2e8d4f-1a3c-4e5b-9d7f-2c1b0a9e8d7c
namestringrequired

Folder name.

Example: locales
formatsstring[]required

The formats you sent.

Enum values:TEXTJSONXMLXLIFFHTMLPPTXDOCXXLSXCSVPDFIDMLDITAMARKDOWNYAMLTABLEAU
Example: ["JSON"]
outputFolderNamestringrequired

Name of the folder the translations are saved to.

Example: locales (translated)
outputLocationstringrequired

Where that folder is created: beside the folder you picked, or at the root of your organization’s drive when its parent cannot take it.

Enum values:besideroot
Example: beside
maxFilesnumberrequired

Most files one run takes.

Example: 200
unsupportedTargetsstring[]required

Target languages a PDF cannot be translated into (no font for their script). Starting the run with them returns 400. Empty when the run has no PDF.

Example: []
filesFolderPreviewFileDto[]required

Files the run would translate.

Show child attributes
pathstringrequired

Path of the file inside the folder.

Example: emails/welcome.json
formatstringrequired

Format of the file.

Enum values:TEXTJSONXMLXLIFFHTMLPPTXDOCXXLSXCSVPDFIDMLDITAMARKDOWNYAMLTABLEAU
Example: JSON
wordsnumberrequired

Billable source words.

Example: 214
filesByFormatobjectrequired

Number of files per format.

Example: {"JSON":12}
skippedFolderSkippedFileDto[]required

Files the run skips, each with the reason.

Show child attributes
pathstringrequired

Path of the file inside the folder.

Example: config.json
reasonstringrequired

Why it is skipped: wrong-type (not one of formats), excluded (matches an exclude pattern), too-large, alias (a shortcut, not a file), empty, unreadable, no-text (nothing to translate) or too-long (a text file over 10,000 characters).

Enum values:wrong-typeexcludedtoo-largealiasemptyunreadableno-texttoo-long
Example: excluded
totalsFolderPreviewTotalsDtorequired

Totals.

Show child attributes
filesnumberrequired

Files that would be translated.

Example: 12
wordsnumberrequired

Billable source words over those files.

Example: 4380
targetsnumberrequired

Target languages (duplicates and the source language removed).

Example: 2
translationsnumberrequired

Translations the run would create: files × targets.

Example: 24
creditsnumberrequired

Credits the run would charge, at your organization’s rates. Send it back as expectedCredits to start the run only at this price.

Example: 4380
balancenumberrequired

Credits your organization can spend now.

Example: 25000
400A field failed validation, or: `“<folder>” has <n> matching files — one run takes at most 200. …`, `“<folder>” holds too many files and folders to scan. Pick a subfolder.`, or `These files can’t be translated as a folder yet.`
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
403The key lacks the permission.
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`folderId` is not a folder of your organization's assets (`Folder 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
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/folder/preview
curl '{{API_BASE_URL}}/v1/galaxy/playground/document/translate/folder/preview' \
  --request POST \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "folderId": "6b2e8d4f-1a3c-4e5b-9d7f-2c1b0a9e8d7c",
  "assetIds": [
    "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"
  ],
  "formats": [
    "DOCX",
    "PPTX"
  ],
  "sourceLanguage": "en-US",
  "targetLanguages": [
    "hi-IN",
    "bn-BD"
  ],
  "tmId": "5c8d2e1f-9a3b-4c6d-8e7f-1a2b3c4d5e6f",
  "suite": "WEB",
  "includeSubfolders": true,
  "exclude": [
    "config*.json"
  ],
  "layout": "language-folder",
  "projectId": "4e7a1b9c-3d2f-4c8e-9a6b-0d1c2b3a4f5e",
  "expectedCredits": 4380,
  "autoQe": false,
  "qeScope": "unverified",
  "translateImages": false
}'
{
  "folder": {
    "id": "6b2e8d4f-1a3c-4e5b-9d7f-2c1b0a9e8d7c",
    "name": "locales"
  },
  "formats": [
    "JSON"
  ],
  "outputFolderName": "locales (translated)",
  "outputLocation": "beside",
  "maxFiles": 200,
  "unsupportedTargets": [],
  "files": [
    {
      "path": "emails/welcome.json",
      "format": "JSON",
      "words": 214
    }
  ],
  "filesByFormat": {
    "JSON": 12
  },
  "skipped": [
    {
      "path": "config.json",
      "reason": "excluded"
    }
  ],
  "totals": {
    "files": 12,
    "words": 4380,
    "targets": 2,
    "translations": 24,
    "credits": 4380,
    "balance": 25000
  }
}

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