> ## Documentation Index
> Fetch the complete documentation index at: https://developers.deepl.com/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.

# Permission Scopes

> Every permission scope for DeepL developer API keys and the endpoints each scope covers.

Each scope grants a [scoped API key](https://developers.deepl.com/docs/admin/api-key-permissions.md) access to the endpoints listed under it. A scoped key can call only endpoints fully covered by its scopes; requests to any other endpoint return `403 Forbidden`.

> [accordion] Translate text (translate:text)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v2/translate`](https://developers.deepl.com/api-reference/translate/request-translation) |

> [accordion] Translate document (translate:document)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v2/document`](https://developers.deepl.com/api-reference/document/upload-and-translate-a-document) |
> | `GET` | [`/v2/document/{document_id}`](https://developers.deepl.com/api-reference/document/check-document-status) |
> | `GET` | [`/v2/document/{document_id}/result`](https://developers.deepl.com/api-reference/document/download-translated-document) |

> [accordion] Translate real-time speech (voice:realtime)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v3/voice/realtime`](https://developers.deepl.com/api-reference/voice/request-session) |
> | `GET` | [`/v3/voice/realtime`](https://developers.deepl.com/api-reference/voice/reconnect-session) |
>
> This scope also covers the [WebSocket stream](https://developers.deepl.com/api-reference/voice/websocket-streaming.md). You open the stream with the streaming URL and token from one of the endpoints above, so a scoped key needs `voice:realtime` to use any part of a real-time session.

> [accordion] Rephrase or correct text (write:improve)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v2/write/rephrase`](https://developers.deepl.com/api-reference/improve-text/request-text-improvement) |
> | `POST` | [`/v2/write/correct`](https://developers.deepl.com/api-reference/improve-text/correct-text) |

> [accordion] View glossaries and their entries (glossaries:read)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `GET` | [`/v3/glossaries`](https://developers.deepl.com/api-reference/multilingual-glossaries/list-all-glossaries) |
> | `GET` | [`/v3/glossaries/{glossary_id}`](https://developers.deepl.com/api-reference/multilingual-glossaries/retrieve-glossary-details) |
> | `GET` | [`/v3/glossaries/{glossary_id}/entries`](https://developers.deepl.com/api-reference/multilingual-glossaries/retrieve-glossary-entries) |
> | `GET` | [`/v2/glossaries`](https://developers.deepl.com/api-reference/glossaries/list-all-glossaries) |
> | `GET` | [`/v2/glossaries/{glossary_id}`](https://developers.deepl.com/api-reference/glossaries/retrieve-glossary-details) |
> | `GET` | [`/v2/glossaries/{glossary_id}/entries`](https://developers.deepl.com/api-reference/glossaries/retrieve-glossary-entries) |
> | `GET` | [`/v2/glossary-language-pairs`](https://developers.deepl.com/api-reference/multilingual-glossaries/list-language-pairs-supported-by-glossaries) |

> [accordion] Create, modify, and delete glossaries (glossaries:write)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v3/glossaries`](https://developers.deepl.com/api-reference/multilingual-glossaries/create-a-glossary) |
> | `PATCH` | [`/v3/glossaries/{glossary_id}`](https://developers.deepl.com/api-reference/multilingual-glossaries/edit-glossary-details) |
> | `PUT` | [`/v3/glossaries/{glossary_id}/dictionaries`](https://developers.deepl.com/api-reference/multilingual-glossaries/replaces-or-creates-a-dictionary-in-the-glossary-with-the-specified-entries) |
> | `DELETE` | [`/v3/glossaries/{glossary_id}`](https://developers.deepl.com/api-reference/multilingual-glossaries/delete-a-glossary) |
> | `DELETE` | [`/v3/glossaries/{glossary_id}/dictionaries`](https://developers.deepl.com/api-reference/multilingual-glossaries/deletes-the-dictionary-associated-with-the-given-language-pair-with-the-given-glossary-id) |
> | `POST` | [`/v2/glossaries`](https://developers.deepl.com/api-reference/glossaries/create-a-glossary) |
> | `DELETE` | [`/v2/glossaries/{glossary_id}`](https://developers.deepl.com/api-reference/glossaries/delete-a-glossary) |

> [accordion] View style rules and custom instructions (style\_rules:read)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `GET` | [`/v3/style_rules`](https://developers.deepl.com/api-reference/style-rules/list-all-style-rules) |
> | `GET` | [`/v3/style_rules/{style_id}`](https://developers.deepl.com/api-reference/style-rules/get-style-rule) |
> | `GET` | [`/v3/style_rules/{style_id}/custom_instructions/{instruction_id}`](https://developers.deepl.com/api-reference/style-rules/get-custom-instruction) |

> [accordion] Create, modify, and delete style rules and custom instructions (style\_rules:write)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v3/style_rules`](https://developers.deepl.com/api-reference/style-rules/create-style-rule) |
> | `PATCH` | [`/v3/style_rules/{style_id}`](https://developers.deepl.com/api-reference/style-rules/update-style-rule) |
> | `PUT` | [`/v3/style_rules/{style_id}/configured_rules`](https://developers.deepl.com/api-reference/style-rules/update-configured-rules) |
> | `DELETE` | [`/v3/style_rules/{style_id}`](https://developers.deepl.com/api-reference/style-rules/delete-style-rule) |
> | `POST` | [`/v3/style_rules/{style_id}/custom_instructions`](https://developers.deepl.com/api-reference/style-rules/create-custom-instruction) |
> | `PUT` | [`/v3/style_rules/{style_id}/custom_instructions/{instruction_id}`](https://developers.deepl.com/api-reference/style-rules/update-custom-instruction) |
> | `DELETE` | [`/v3/style_rules/{style_id}/custom_instructions/{instruction_id}`](https://developers.deepl.com/api-reference/style-rules/delete-custom-instruction) |

> [accordion] Retrieve and export translation memories (translation\_memories:read)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `GET` | [`/v3/translation_memories`](https://developers.deepl.com/api-reference/translation-memory/list-translation-memories) |
> | `GET` | [`/v3/translation_memories/{translation_memory_id}`](https://developers.deepl.com/api-reference/translation-memory/retrieve-a-translation-memory) |
> | `GET` | [`/v3/translation_memories/{translation_memory_id}/segments`](https://developers.deepl.com/api-reference/translation-memory/list-translation-memory-segments) |
> | `POST` | [`/v3/translation_memories/{translation_memory_id}/export`](https://developers.deepl.com/api-reference/translation-memory/export-a-translation-memory) |
> | `GET` | [`/v3/translation_memories/jobs/{job_id}`](https://developers.deepl.com/api-reference/translation-memory/retrieve-a-translation-memory-job) |
>
> Exporting is a read operation, so it needs `translation_memories:read` rather than `translation_memories:write`, even though it uses `POST`.

> [accordion] Import and delete translation memories (translation\_memories:write)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `POST` | [`/v3/translation_memories/import`](https://developers.deepl.com/api-reference/translation-memory/import-a-translation-memory) |
> | `DELETE` | [`/v3/translation_memories/{translation_memory_id}`](https://developers.deepl.com/api-reference/translation-memory/delete-a-translation-memory) |

> [accordion] Retrieve languages and resources (languages:read)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `GET` | [`/v3/languages`](https://developers.deepl.com/api-reference/languages/retrieve-languages-by-resource) |
> | `GET` | [`/v3/languages/resources`](https://developers.deepl.com/api-reference/languages/retrieve-resources) |
> | `GET` | [`/v2/languages`](https://developers.deepl.com/api-reference/languages/retrieve-supported-languages) |

> [accordion] View subscription usage and limits (usage:read)
>
> | **Method** | **Endpoint** |
> | - | - |
> | `GET` | [`/v2/usage`](https://developers.deepl.com/api-reference/usage-and-quota/check-usage-and-limits) |

> [!NOTE]
>
> No scope covers [audio file translation](https://developers.deepl.com/api-reference/jobs-voice-translate.md) yet, so those endpoints are accessible only with unrestricted keys.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.