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

# OpenAPI spec

> How to fetch the OpenAPI specifications for the DeepL API

The DeepL API is described by an [OpenAPI specification](https://openapis.org/) for the REST endpoints and an [AsyncAPI specification](https://www.asyncapi.com/) for the streaming Voice API. Both are published in YAML and JSON.

Fetch them from this documentation site at a stable URL:

| **Spec**                              | **Format** | **URL**                                                                                |
| ------------------------------------- | ---------- | -------------------------------------------------------------------------------------- |
| REST API (source of truth)            | YAML       | [`/api-reference/openapi.yaml`](/api-reference/openapi.yaml)                           |
| REST API                              | JSON       | [`/api-reference/openapi.json`](/api-reference/openapi.json)                           |
| Voice WebSocket API (source of truth) | YAML       | [`/api-reference/voice/voice.asyncapi.yaml`](/api-reference/voice/voice.asyncapi.yaml) |
| Voice WebSocket API                   | JSON       | [`/api-reference/voice/voice.asyncapi.json`](/api-reference/voice/voice.asyncapi.json) |

The JSON files are generated from the YAML sources, so treat the YAML as authoritative.

The same files are available on [GitHub](https://github.com/DeepL/api-docs/tree/main/api-reference) if you prefer to pin a revision.

You can use these specs to explore the API in tools like [Postman](https://www.postman.com/), or to auto-generate SDKs and code libraries using tools such as [Swagger Editor](https://editor.swagger.io/?url=https://raw.githubusercontent.com/DeepL/api-docs/main/api-reference/openapi.yaml) or [OpenAPI Generator](https://openapi-generator.tech/).

<Note>
  Swagger's "Try it out" in-browser simulator creates valid curl requests, but requests will fail due to [CORS restrictions](/docs/best-practices/cors-requests).
</Note>

If you encounter issues or have feature requests, [create an issue](https://github.com/DeepL/api-docs/issues).
