Once you’ve created a DeepL API account and located your authentication key, you’re ready to make your first requests.

Text translation

To translate text, you can use the /translate endpoint, which also supports translation of XML and HTML content. We included text translation examples for our client libraries, too, just to give you an idea of what they look like.
If you chose a free API plan, replace https://api.deepl.com with https://api-free.deepl.com.
Example request
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"}
Example response
{
  "translations": [
    {
      "detected_source_language": "EN",
      "text": "Hallo, Welt!"
    }
  ]
}

Text improvement

To improve text, you can use the /write/rephrase endpoint. We included an example below. The text improvement endpoint (DeepL API for Write) is currently only available to Pro API subscribers via the v2 endpoint.

Write API example: cURL

Example cURL request
curl -X POST 'https://api.deepl.com/v2/write/rephrase' \
--header 'Authorization: DeepL-Auth-Key [yourAuthKey]' \
--header 'Content-Type: application/json' \
--data '{
  "text": [
    "Its never to late too fix you'\''re grammer & speling!"
  ],
  "target_lang": "en-GB"
}'
Example response
{
  "improvements": [
    {
      "text": "It's never too late to fix your grammar and spelling!",
      "detected_source_language": "en",
      "target_language": "en-GB"
    }
  ]
}