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

# Translate

> Translate text strings and complete documents with the DeepL API. Find quickstarts, markup handling guides, and customization options.

The Translate API converts text between any of the [supported languages](/docs/getting-started/supported-languages) through two endpoints:

* **Text translation** (`/v2/translate`): translate one or many strings per request, with automatic source language detection. Suited for UI strings, messages, and any text your application handles directly.
* **Document translation** (`/v2/document`): upload complete files, including Word, PowerPoint, PDF, and HTML, and download the translation with the original formatting intact.

## Start here

<CardGroup cols={2}>
  <Card title="Translate Text Quickstart" icon="language" href="/docs/translate/translate-text-quickstart">
    Send your first translation request and batch multiple strings into one call.
  </Card>

  <Card title="Translate Documents Quickstart" icon="file-lines" href="/docs/translate/translate-documents-quickstart">
    Upload a Word document, poll its status, and download the translated file.
  </Card>

  <Card title="How to Use the Context Parameter" icon="lightbulb" href="/docs/learning-how-tos/examples-and-guides/how-to-use-context-parameter">
    Improve translation quality for short or ambiguous text by passing surrounding context.
  </Card>

  <Card title="XML and HTML Handling" icon="code" href="/docs/xml-and-html-handling/xml">
    Translate markup without breaking it: tag handling for XML, HTML, and structured content.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/translate/request-translation">
    Full request and response schemas for the text and document translation endpoints.
  </Card>
</CardGroup>

## Customize translations

Beyond per-request parameters, DeepL's customization features let you tailor translations to your domain and keep terminology consistent: glossaries, style rules, custom instructions, and translation memories. They all work with both text and document translation; see the [Customize tab](/docs/customize/overview) for guides on each.
