Set input_format when creating a task. Set the following parameters when calling POST /transforms/{uuid}/launch. Once launch is accepted, parameters cannot be changed.
Supported combinations
| Input | Output | Translation | Rendering modes |
|---|---|---|---|
| Markdown ZIP or EPUB | Optional | source without translation; replace, bilingual, bilingual-inline with translation | |
| Required | replace only | ||
| EPUB | EPUB | Required | replace, bilingual, bilingual-inline |
EPUB to PDF/Markdown and untranslated PDF to PDF are not supported by this API.
For an example of the Markdown ZIP structure and what to verify in the output, download the sample scan and result in the PDF to Markdown guide.
Keep the source language
For PDF to EPUB, omit target_language:
{"output_format":"epub"}Use "output_format":"markdown" for Markdown ZIP. With no translation, rendering_mode defaults to source. You cannot supply a translation prompt or a bilingual mode without a target language.
Translate a document
Translate a PDF or EPUB into an English EPUB:
{ "output_format": "epub", "target_language": "en", "rendering_mode": "bilingual", "translation_prompt": "Keep product names unchanged."}replace produces translated-only text and is the default when translating. bilingual appends translation by block; bilingual-inline appends it within the text flow. Neither means a side-by-side, two-column PDF.
For translated PDF output:
{"output_format":"pdf","target_language":"en","rendering_mode":"replace"}Use translation_prompt to specify how to translate terms or names. You can omit it, but if supplied it must not be blank. The service trims surrounding whitespace. This field cannot select a model.
Unknown fields or parameters that do not apply to the conversion return 400 INVALID_REQUEST.
PDF extraction and refinement
refinement | Behavior |
|---|---|
disabled | Ordinary extraction without footnotes or page refinement; default |
refinement_with_footnotes | Page refinement with footnote extraction |
{"output_format":"epub","refinement":"refinement_with_footnotes"}This field applies only to PDF input. EPUB input must omit it, including "refinement":"disabled". The old footnotes field is rejected, even when sent alongside refinement; footnotes_only and refinement_only are not available. Footnote preview stream names are unchanged. PDF headers and footers are processed automatically and have no separate public switch.
Target languages
target_language accepts exactly these case-sensitive codes:
| Code | Language | Code | Language |
|---|---|---|---|
zh-CN | Chinese | en | English |
de | German | es | Spanish |
fr | French | it | Italian |
ja | Japanese | ko | Korean |
pt | Portuguese | ru | Russian |
ar | Arabic | hi | Hindi |
nl | Dutch | pl | Polish |
tr | Turkish | vi | Vietnamese |
th | Thai | id | Indonesian |
sv | Swedish | da | Danish |
no | Norwegian | fi | Finnish |
Website language tags are not necessarily API language codes. zh, zh-Hant, it-IT, pt-BR, full language names and values with surrounding whitespace are rejected.
For HTTP fields and response codes, see the API reference. For interruption or failed tasks, see lifecycle and recovery.
