How to hit the DeepL API

DeepL's API translates text and documents. Free-plan keys (ending in :fx) use https://api-free.deepl.com; Pro keys use https://api.deepl.com.

Authentication

Copy your key from Account → API Keys and send it as Authorization: DeepL-Auth-Key <key>. In the examples it's written {{DEEPL_API_KEY}}.

Full reference: https://developers.deepl.com/docs

Translate text

source_lang is optional; DeepL detects it.

curl -X POST https://api-free.deepl.com/v2/translate \
  -H "Authorization: DeepL-Auth-Key {{DEEPL_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"text": ["Hello, world!"], "target_lang": "DE"}'
Run in PostTaco

Check usage

Characters used this billing period.

curl https://api-free.deepl.com/v2/usage \
  -H "Authorization: DeepL-Auth-Key {{DEEPL_API_KEY}}"
Run in PostTaco

Supported languages

curl "https://api-free.deepl.com/v2/languages?type=target" \
  -H "Authorization: DeepL-Auth-Key {{DEEPL_API_KEY}}"
Run in PostTaco