Endpoint
dl_session cookie for authentication. It provides enhanced translation capabilities available to Pro users.
Authentication
Access Token
If an access token is configured on the server, include it in one of the following ways:- Query Parameter
DeepL Pro Session
DeepL Pro session cookie:
dl_session=your_session_valueImportant: The session value must NOT contain a period (.). Sessions with periods indicate free accounts, not Pro accounts.How to get your dl_session cookie
How to get your dl_session cookie
Request Body
The text to be translated. Can contain multiple sentences or paragraphs.
The source language code (e.g., “EN”, “DE”, “FR”, “ZH”). Use “auto” or omit for automatic detection.
The target language code (e.g., “EN”, “DE”, “FR”, “ZH”).
Specifies how to handle tags in the text. Allowed values:
html or xml. Leave empty for plain text.Response
HTTP status code (200 for success)
Unique identifier for the translation request
The primary translated text
Array of alternative translations
Detected or specified source language
Target language for the translation
Translation method used by the API (“Pro” for this endpoint)
Examples
Success Response
Error Responses
400 Bad Request - Invalid tag_handling
400 Bad Request - Invalid tag_handling
tag_handling is set to a value other than html or xml.401 Unauthorized - No Session
401 Unauthorized - No Session
401 Unauthorized - Not a Pro Account
401 Unauthorized - Not a Pro Account
401 Unauthorized - Invalid Token
401 Unauthorized - Invalid Token
Notes
- Requires DeepL Pro Account: This endpoint only works with valid Pro account sessions
- Session Validation: Free account sessions (containing
.) are rejected - Cookie Priority: If both config
dl_sessionand requestCookieheader are provided, the header takes precedence - Enhanced Quality: Pro accounts provide higher quality translations and additional features
- The
alternativesfield provides multiple translation options for better context
