Trigger Export

View as Markdown
Enqueue an async export for one target language in the requested format. Returns `202 Accepted` with `export_state=Pending`. Poll `GET /translate/document/jobs/{job_id}/export/status` until `export_state` is `Completed`, then download from `download_url`. - PDF/DOCX uploads support cross-format export (`pdf`, `docx`, `html`, `txt`, `epub`). - Office uploads (xlsx, pptx, docx) export in the original format only. - Optional `fit_line_height` / `fit_font_shrink` tune PDF/DOCX shrink-to-fit. - Returns `409` when an export for the same language and format is already `Pending` or `Running`.

Authentication

api-subscription-keystring
API Key authentication via header

Path parameters

job_idstringRequired

The job_id returned by POST /translate/document/jobs.

Query parameters

langenumRequired

BCP-47 target language code (e.g. hi-IN).

formatenumRequired

Target export format. PDF/DOCX jobs: pdf, docx, html, txt, or epub. Office formats export in the source file’s native format.

Allowed values:
fit_line_heightbooleanOptional

When true, the export may reduce line spacing to fit translated text within the original layout. PDF/DOCX only.

fit_font_shrinkbooleanOptional

When true, the export may reduce font size to fit translated text within the original layout. PDF/DOCX only.

Response

Export enqueued.
export_idstring
Unique export job identifier.
job_idstring
The job this export belongs to.
target_language_codestring

BCP-47 code of the exported file.

formatstring

Output format (e.g. pdf, docx, xlsx).

export_stateenum

Current state of the export: Pending, Running, Completed, or Failed.

created_atstringformat: "date-time"
Export creation timestamp.
download_urlstring or nullOptional

Signed download URL when export_state is Completed.

filenamestring or nullOptional
Output filename.
file_sizeinteger or nullOptional
Output file size in bytes.
expires_in_hoursinteger or nullOptional
Hours until the download URL expires.
error_messagestring or nullOptional

Sanitized failure reason when export_state is Failed.

completed_atstring or nullOptionalformat: "date-time"

Export completion timestamp. Present when export_state is Completed or Failed.

progressinteger or nullOptional

0–100 for PDF/DOCX page render; omitted for other formats.

pages_completedinteger or nullOptional

Pages rendered so far (PDF/DOCX with page-level render).

pages_totalinteger or nullOptional
Total pages in the export render pass.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
409
Conflict Error
500
Internal Server Error
503
Service Unavailable Error