Skip to content

cURL

Example of a request using the curl command.

Free Endpoint

bash
curl -X POST http://localhost:1188/translate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_access_token" \
-d '{
    "text": "Hello, world!",
    "source_lang": "EN",
    "target_lang": "DE"
}'

Pro Endpoint

bash
curl -X POST http://localhost:1188/v1/translate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your_access_token" \
-d '{
    "text": "Hello, world!",
    "source_lang": "EN",
    "target_lang": "DE"
}'

Official Endpoint

bash
curl -X POST 'http://localhost:1188/v2/translate' \
--header 'Authorization: DeepL-Auth-Key [yourAccessToken]' \
--header 'Content-Type: application/json' \
--data '{
  "text": [
    "Hello, world!"
  ],
  "target_lang": "DE"
}'

Released under the MIT License.