Pro Endpoint
Same oneshot REST channel as the free endpoint, but routed through oneshot-pro.www.deepl.com/v1/translate with a Pro Bearer token attached. Requires a valid Pro access token; pass it via the -s flag or the DL_SESSION environment variable when starting DeepLX.
Breaking change in v1.2.0
Before v1.2.0, the -s / DL_SESSION value was the legacy dl_session browser cookie. Since v1.2.0, the value is sent verbatim as an OAuth Bearer access token to oneshot-pro.www.deepl.com. Existing Pro users must extract an OAuth access token (e.g. from the Chrome extension's storage or via the cookie_bearer_exchange flow at https://w.deepl.com/oidc/cookie_bearer_exchange) and pass that as -s instead.
/v1/translate
Method: POST
Request Headers
| Header | Description | Value |
|---|---|---|
Content-Type | The content type of the request body. | application/json |
Authorization | Optional. Access token to protect your own DeepLX instance, when DeepLX is started with -token. | Bearer your_access_token |
If you cannot pass Authorization, you can also use a URL parameter instead: /v1/translate?token=your_access_token.
Request Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
text | string | The text you want to translate. | true |
target_lang | string | The language code you want to translate to (e.g. DE, EN-US, ZH-HANS). | true |
source_lang | string | The language code of the source text. Set to auto or omit entirely for server-side autodetection. | false |
Response
{
"alternatives": null,
"code": 200,
"data": "Hallo Welt",
"id": 1779423094485,
"method": "Pro",
"source_lang": "EN",
"target_lang": "DE"
}TIP
alternatives is always null since v1.2.0 — the oneshot endpoint does not return alternative translations. The field is kept for backward compatibility with clients that still read it.
Error Responses
Same validation rules and status codes as the Free endpoint. The Pro path additionally surfaces upstream auth failures: an invalid or expired Bearer token returns HTTP 503 with the underlying upstream error message.
Supported Languages
Identical to the Free endpoint — see the supported languages reference.