Create Document Translation Job

View as Markdown
## Document Translation Create a document translation job. Returns a `job_id` and a short-lived signed `upload_url`. **Flow:** 1. `POST /translate/document/jobs` with source/target languages and options. 2. `PUT` the raw file bytes to `upload_url` with header `Content-Type: <mime>`. 3. `POST /translate/document/jobs/{job_id}/start` to begin the pipeline. 4. Poll `GET /translate/document/jobs/{job_id}/live-status` until translation completes. 5. `POST /translate/document/jobs/{job_id}/export?lang=<code>&format=<fmt>` to enqueue an async export for each target language. 6. Poll `GET /translate/document/jobs/{job_id}/export/status` until `export_state` is `Completed`, then download from `download_url`. A single job translates into every language in `target_language_codes`. Exports run asynchronously — do not expect the download URL in the trigger response.

Authentication

api-subscription-keystring
API Key authentication via header

Request

This endpoint expects an object.
job_namestringRequired1-255 characters

Human-readable job name.

source_language_codeenumRequired

Source language (BCP-47).

original_filenamestringRequired>=1 character

Original filename with extension. Supported: PDF, OOXML, legacy Office, HTML, ODF.

target_language_codeslist of enumsRequired

Target languages (BCP-47).

genreenum or nullOptional

Genre enum name (e.g. NON_FICTION). Use the enum constant name, not the human-readable label.

metadatamap from strings to any or nullOptional

Arbitrary key-value metadata attached to the job.

auto_processbooleanOptionalDefaults to true

When true (default), translation begins automatically after the document is parsed.

model_typeenum or nullOptional

Translation model quality tier: lite (faster, short-form content) or plus (higher quality, long-form content). Defaults to plus when omitted.

use_native_numeralsboolean or nullOptional

null (default) uses the application default. true uses native numerals; false uses international numerals.

style_guidelinesstring or nullOptional

Global tone, terminology, and formatting instructions (up to ~4000 characters). Applies to every target language.

language_specific_guidelinesmap from strings to strings or nullOptional

Per-language overrides (up to ~4000 characters each). Keys must match entries in target_language_codes.

Response

Job created.
job_idstring
Unique job identifier.
upload_urlstring
Signed URL for direct file upload.
expires_in_hoursinteger
Hours until the upload URL expires.
source_language_codestring
Echo of request source language.
target_language_codeslist of strings
Echo of target languages.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
500
Internal Server Error