Zum Hauptinhalt springen

Dieses Dokument ist derzeit auf Englisch und vereinfachtem Chinesisch verfügbar. Unten wird die englische Fassung angezeigt.

Auf dieser Seite

API

Conversion and translation

Supported file formats, translation modes and PDF footnote options.

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 footnotes

footnotesBehavior
disabledDisable footnote extraction; default
basicBasic footnote extraction
refinedRefined footnote processing
json
{"output_format":"epub","footnotes":"refined"}

EPUB input does not accept footnotes, including "footnotes":"disabled". This option controls PDF footnotes only. The API has no separate options for page headers or footers.

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.