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

# Quickstart

## Get an API key and get started

New user? Follow these quick steps to get started with the DeepL API.

<Steps>
  <Step title="Sign up for the API" titleSize="h3">
    Visit [our plans page](https://www.deepl.com/pro-api#api-pricing), choose a plan, and sign up.

    If you already have a DeepL Translator account, you will need to log out and [create a new account](https://support.deepl.com/hc/articles/360019358999-Change-plan).
  </Step>

  <Step title="Test your API key with a request" titleSize="h3">
    Find your API key [here](https://www.deepl.com/your-account/keys).
    Then try making a simple translation request.

    <Tabs>
      <Tab title="HTTP Request">
        <Tip>
          If you chose a free API plan, replace `https://api.deepl.com` with `https://api-free.deepl.com`.
        </Tip>

        ```http Sample request theme={null}
        POST /v2/translate HTTP/2
        Host: api.deepl.com
        Authorization: DeepL-Auth-Key [yourAuthKey] 
        User-Agent: YourApp/1.2.3
        Content-Length: 45
        Content-Type: application/json

        {"text":["Hello, world!"],"target_lang":"DE"}
        ```

        ```json Sample response theme={null}
        {
          "translations": [
            {
              "detected_source_language": "EN",
              "text": "Hallo, Welt!"
            }
          ]
        }
        ```
      </Tab>

      <Tab title="cURL">
        <Tip>
          If you chose a free API plan, replace `https://api.deepl.com` with `https://api-free.deepl.com`.
        </Tip>

        ```sh Set the API key theme={null}
        export API_KEY={YOUR_API_KEY}
        ```

        ```sh Sample request theme={null}
        curl -X POST https://api.deepl.com/v2/translate \
          --header "Content-Type: application/json" \
          --header "Authorization: DeepL-Auth-Key $API_KEY" \
          --data '{
            "text": ["Hello world!"], 
            "target_lang": "DE"
        }'
        ```

        ```json Sample response theme={null}
        {
          "translations": [
            {
              "detected_source_language": "EN",
              "text": "Hallo, Welt!"
            }
          ]
        }
        ```
      </Tab>

      <Tab title="Python">
        ```sh Install client library theme={null}
        pip install deepl
        ```

        ```py Sample request theme={null}
        import deepl

        auth_key = "{YOUR_API_KEY}" # replace with your key
        deepl_client = deepl.DeepLClient(auth_key)

        result = deepl_client.translate_text("Hello, world!", target_lang="DE")
        print(result.text)
        ```

        ```text Sample output theme={null}
        Hallo, Welt!
        ```

        <Tip>
          In production code, it's safer to store your API key in an environment variable.
        </Tip>
      </Tab>

      <Tab title="JavaScript">
        ```sh Install client library theme={null}
        npm install deepl-node
        ```

        ```javascript Sample request theme={null}
        import * as deepl from 'deepl-node';

        const authKey = "{YOUR_API_KEY}"; // replace with your key
        const deeplClient = new deepl.DeepLClient(authKey);

        (async () => {
            const result = await deeplClient.translateText('Hello, world!', null, 'de');
            console.log(result.text);
        })();
        ```

        ```text Sample output theme={null}
        Hallo, Welt!
        ```

        <Tip>
          In production code, it's safer to store your API key in an environment variable.
        </Tip>
      </Tab>

      <Tab title="PHP">
        ```sh Install client library theme={null}
        composer require deeplcom/deepl-php
        ```

        ```php Sample request theme={null}
        require_once 'vendor/autoload.php';
        use DeepL\Client;

        $authKey = "{YOUR_API_KEY}"; // replace with your key
        $deeplClient = new DeepL\DeepLClient($authKey);

        $result = $deeplClient->translateText('Hello, world!', null, 'de');
        echo $result->text;
        ```

        ```text Sample output theme={null}
        Hallo, Welt!
        ```

        <Tip>
          In production code, it's safer to store your API key in an environment variable.
        </Tip>
      </Tab>

      <Tab title="C#">
        ```sh Install client library theme={null}
        dotnet add package DeepL.net
        ```

        ```csharp Sample request theme={null}
        using DeepL; // this imports the DeepL namespace. Use the code below in your main program.

        var authKey = "{YOUR_API_KEY}"; // replace with your key
        var client = new DeepLClient(authKey);

        var translatedText = await client.TranslateTextAsync(
            "Hello, world!",
            null,
            LanguageCode.German);
        Console.WriteLine(translatedText);
        ```

        ```text Sample output theme={null}
        Hallo, Welt!
        ```

        <Tip>
          In production code, it's safer to store your API key in an environment variable.
        </Tip>
      </Tab>

      <Tab title="Java">
        ```java Install client library theme={null}
        // For instructions on installing the DeepL Java library,
        // see https://github.com/DeepL/deepl-java?tab=readme-ov-file#installation
        ```

        ```java Sample request theme={null}
        import com.deepl.api.*;

        public class Main {
            public static void main(String[] args) throws DeepLException, InterruptedException {
                String authKey = "{YOUR_API_KEY}"; // replace with your key
                DeepLClient client = new DeepLClient(authKey);

                TextResult result = client.translateText("Hello, world!", null, "de");
                System.out.println(result.getText());
            }
        }
        ```

        ```text Sample output theme={null}
        Hallo, Welt!
        ```

        <Tip>
          In production code, it's safer to store your API key in an environment variable.
        </Tip>
      </Tab>

      <Tab title="Ruby">
        ```sh Install client library theme={null}
        gem install deepl-rb
        ```

        ```ruby Sample request theme={null}
        require 'deepl'

        DeepL.configure do |config|
            config.auth_key = '{YOUR_API_KEY}' # replace with your key
        end

        translation = DeepL.translate 'Hello, world!', nil, 'de'
        puts translation.text
        ```

        ```text Sample output theme={null}
        Hallo, Welt!
        ```

        <Tip>
          In production code, it's safer to store your API key in an environment variable.
        </Tip>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Keep building" titleSize="h3">
    Pick the product you want to integrate:

    <CardGroup cols={2}>
      <Card title="Translate" icon="language" href="/docs/translate/overview">
        Translate text strings and complete documents, with quickstarts for both.
      </Card>

      <Card title="Customize" icon="wand-magic-sparkles" href="/docs/customize/overview">
        Tailor translations to your domain with glossaries, style rules, and translation memories.
      </Card>

      <Card title="Voice" icon="waveform-lines" href="/docs/voice/overview">
        Transcribe and translate spoken audio in real time, starting with the Real-Time Voice Quickstart.
      </Card>

      <Card title="Admin" icon="sliders" href="/docs/admin/overview">
        Manage API keys, permissions, and usage across your organization, in the account UI or via the Admin API.
      </Card>
    </CardGroup>

    [Our official client libraries](/docs/getting-started/client-libraries) wrap the API for Python, JavaScript, PHP, .NET, Java, and Ruby, and the community maintains [libraries for more languages](https://github.com/DeepL/awesome-deepl?tab=readme-ov-file#community-libraries--sdks), including Dart, Go, and Rust.
  </Step>
</Steps>

## Keep exploring

* [**Cookbook**](/docs/learning-how-tos/cookbook) - Short tutorials, examples, projects, and use cases
* [**Guides**](/docs/learning-how-tos/examples-and-guides) - In-depth explanations for API features and real-world applications
* [**Docs MCP Server**](/docs/getting-started/docs-mcp-server) - Connect your AI tools to this documentation for source-grounded answers

## Community and Support

<CardGroup cols={2}>
  <Card icon="circle-question" horizontal href="https://support.deepl.com/">
    Support Center
  </Card>

  <Card icon="discord" horizontal href="https://discord.gg/deepl">
    Discord Community
  </Card>

  <Card icon="signal-stream" horizontal href="https://status.deepl.com/?tab=api">
    API Status Page
  </Card>

  <Card icon="tower-broadcast" horizontal href="https://status.deepl.com/">
    DeepL Status Page (all services)
  </Card>

  <Card icon="notes" horizontal href="/docs/resources/roadmap-and-release-notes">
    Release Notes
  </Card>
</CardGroup>
