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

# Access and authentication

> Learn where to find your authentication key and how to access the DeepL API.

The DeepL API is accessible through an HTTP interface as well as a selection of programming language-specific client libraries.

The API endpoints accept both form-encoded (`Content-Type: application/x-www-form-urlencoded`) and JSON-encoded (`Content-Type: application/json`) request bodies, and return JSON-encoded responses.

One exception regarding content type is the `/document` endpoint when uploading a document. Because this includes a file upload, it must be an HTTP POST request with content type `multipart/form-data`. Content type `multipart/form-data` should not be used with other endpoints such as `/translate`. It is only officially supported when used to upload a document via the `/document` endpoint.

There is a header size limit of 16 KiB (16\*1024 bytes) for all requests.

<Info>
  Please note: the API endpoint is different for the Free API and Pro API. You may have to adapt your code when using the code samples provided here!

  Free API -> `https://api-free.deepl.com` <br />
  Pro API -> `https://api.deepl.com`
</Info>

### Authentication

You need an authentication key to access the API. You can find your key in the ["API Keys" tab in your account](https://www.deepl.com/your-account/keys). It is important to keep your keys confidential. You should not use an API key in publicly-distributed code.

DeepL API Free authentication keys can be identified easily by the suffix ":fx" (e.g., 279a2e9d-83b3-c416-7e2d-f721593e42a0:fx)

<Info>
  Keep your API key secure at all times. Do not use it in client-side code.
</Info>

If your authentication key becomes compromised, you also deactivate it and create a new key in [the "API Keys" tab](https://www.deepl.com/your-account/keys).

Learn more about managing your DeepL API keys [here](/docs/admin/managing-api-keys).

The authentication key is provided by setting the *Authorization* HTTP header to `DeepL-Auth-Key [yourAuthKey]`.

#### API Versions

The primary API version is v2, meaning that most request paths start with `/v2/`. Some endpoints are also available under `/v3/` — see [v2 vs v3 glossary endpoints](/api-reference/glossaries/v2-vs-v3-endpoints) for details.

The previous version of the API (`/v1/`) is also available for compatibility reasons and matches v2 functionality. Usage is reported and billed normally when accessing v1 endpoints.

If you intend to integrate DeepL Pro into a CAT tool or another tool assisting translation, please contact [cat-tool.support@DeepL.com](mailto:cat-tool.support@DeepL.com).
