Endpoint
Authentication
If an access token is configured on the server, include it in one of the following ways:- Query Parameter
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
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 - Invalid Token
401 Unauthorized - Invalid Token
429 Too Many Requests
429 Too Many Requests
Notes
- This endpoint uses the DeepL free API and does not require a Pro account
- Source language can be set to “auto” for automatic detection
- The
alternativesfield provides additional translation options - Tag handling is useful for preserving HTML or XML structure in translated text
