# Conversion and translation

[HTML](https://pdfcraft.ai/en/docs/api/conversion/) · [Site index](https://pdfcraft.ai/llms.txt)

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

| Input | Output | Translation | Rendering modes |
| --- | --- | --- | --- |
| PDF | Markdown ZIP or EPUB | Optional | `source` without translation; `replace`, `bilingual`, `bilingual-inline` with translation |
| PDF | PDF | 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.

## 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

| `footnotes` | Behavior |
| --- | --- |
| `disabled` | Disable footnote extraction; default |
| `basic` | Basic footnote extraction |
| `refined` | Refined 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:

| 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](https://pdfcraft.ai/en/docs/api/overview/). For interruption or failed tasks, see [lifecycle and recovery](https://pdfcraft.ai/en/docs/api/lifecycle/).
