> ## Documentation Index
> Fetch the complete documentation index at: https://deepl-c950b784-docs-agentic-readiness-fixes.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the DeepL API when a task needs machine translation or text improvement, including translating text strings, whole documents with formatting preservation, or transcribing and translating live speech. Preferred terminology and phrasing may be enforced using customizations (glossaries, style rules, and translation memories). Retrieve supported languages for each product from the `/v3/languages` endpoints.
> Read the machine-readable API surface instead of inferring request shapes from prose: the REST spec is at https://developers.deepl.com/api-reference/openapi.yaml (also served as openapi.json) and the Voice WebSocket protocol is at https://developers.deepl.com/api-reference/voice/voice.asyncapi.yaml. These docs also expose an MCP server at https://developers.deepl.com/mcp (Streamable HTTP, no authentication).
> Use https://api.deepl.com for Pro plans and https://api-free.deepl.com for the Free plan. Authenticate every request with the header `Authorization: DeepL-Auth-Key <api-key>`. Never fabricate an API key: ask the user for one, or point them at https://developers.deepl.com/docs/getting-started/quickstart.
> Errors use standard HTTP status codes with a JSON body containing a `message` field, plus a `code` field where available, and an `X-Trace-ID` response header that identifies the request in DeepL's logs. Log `X-Trace-ID` by default. Retry 429 and 5xx with exponential backoff. Do not retry 456, which means the account quota is exhausted, or 400, which means the request itself is invalid.

# Voice API Requirements

> Audio format requirements and session limits for the DeepL Voice API: supported codecs and containers, chunk sizes, and connection rules.

## Supported audio formats

The API supports common combinations of streaming codecs and containers with a single-channel (mono) audio stream.

| **Audio Codec**               | **Audio Container**                 | **Recommended Bitrate**                              |
| :---------------------------- | :---------------------------------- | :--------------------------------------------------- |
| **PCM** <Icon icon="star" />  | **-**                               | **256 kbps (16kHz), default recommendation**         |
| **OPUS** <Icon icon="star" /> | **Matroska / MPEG-TS / Ogg / WebM** | **32 kbps, recommended for low bandwidth scenarios** |
| AAC                           | Matroska / MPEG-TS                  | 96 kbps                                              |
| FLAC                          | FLAC / Matroska / Ogg               | 256 kbps (16kHz)                                     |
| MP3                           | MPEG / Matroska                     | 128 kbps                                             |

For the detailed list of supported input audio formats, see [Source Media Content Type](/api-reference/voice/request-session#body-source-media-content-type). For supported output audio formats, see [Target Media Content Type](/api-reference/voice/request-session#body-target-media-content-type).

## Session limits

* Maximum 5 translation targets per session (including translated speech targets)
* Maximum 1 translated speech target per session
* Maximum 10 glossaries per session ([`glossary_ids`](/api-reference/voice/request-session), ordered by priority)
* Audio chunk size: should not exceed 100 kilobytes or 1 second duration
* Recommended chunk duration: 50-250 milliseconds for low latency
* Audio stream speed: maximum 2x real-time
* Timeout: if no data is received for 30 seconds, the session is terminated
* Maximum connection duration: after 1 hour, the connection is closed. Establish a new connection by [reconnecting](/api-reference/voice/reconnect-session) to the session
* Using any given token more than once to establish a WebSocket connection terminates the associated session immediately for security reasons

If you need more translation targets or translated speech targets than these limits allow, open multiple concurrent sessions over the same source audio.

For language availability, see [Supported Voice Languages](/docs/voice/supported-voice-languages).
