Skip to main content
On this page

API

Conversion and translation

Supported file formats, translation modes and PDF refinement options.

Process documents with API or MCP

Create API key

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

InputOutputTranslationRendering modes
PDFMarkdown ZIP or EPUBOptionalsource without translation; replace, bilingual, bilingual-inline with translation
PDFPDFRequiredreplace only
EPUBEPUBRequiredreplace, bilingual, bilingual-inline

EPUB to PDF/Markdown and untranslated PDF to PDF are not supported by this API.

Keep the source language

For PDF to EPUB, omit target_language:

json
{"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:

json
{  "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:

json
{"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

refinementBehavior
disabledOrdinary extraction without footnotes or page refinement; default
refinement_with_footnotesPage refinement with footnote extraction
json
{"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:

CodeLanguageCodeLanguage
zh-CNChineseenEnglish
deGermanesSpanish
frFrenchitItalian
jaJapanesekoKorean
ptPortugueseruRussian
arArabichiHindi
nlDutchplPolish
trTurkishviVietnamese
thThaiidIndonesian
svSwedishdaDanish
noNorwegianfiFinnish

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.

Process documents with API or MCP

Create an API key so your app or AI agent can convert and translate PDFs and EPUBs.

Create API key