Upload and Translate a Document
Changed onUpload a document for translation and receive a document_id and document_key. Use them to poll the document status and download the translated file. Translation is asynchronous: the upload response confirms the request, not a finished translation.
Request
- Base URLhttps://api.deepl.com
- URLhttps://api.deepl.com/v2/document
- AuthAPI key in header Authorization
Request body multipart/form-data
Example request
{
"source_lang": "EN",
"target_lang": "DE",
"input_conversion_options": "version:1,suppress-image-types:all",
"formality": "prefer_more",
"glossary_id": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7",
"glossary_ids": [
"def3a26b-3e84-45b3-84ae-0c0aaf3525f7"
],
"style_id": "7ff9bfd6-cd85-4190-8503-d6215a321519",
"translation_memory_id": "a74d88fb-ed2a-4943-a664-a4512398b994",
"translation_memory_threshold": 75,
"custom_instructions": "[\"Use a friendly, diplomatic tone\"]",
"style_profile_id": "3f1c9d0e-7a24-4b58-9c31-8f0e5d2a1b47"
}Response
The document function returns a JSON object containing the ID and encryption key assigned to the uploaded document. Once received by the server, uploaded documents are immediately encrypted using a uniquely generated encryption key. This key is not persistently stored on the server. Therefore, it must be stored by the client and sent back to the server with every subsequent request that refers to this particular document.
Example response
{
"document_id": "04DE5AD98A02647D83285A36021911C6",
"document_key": "0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A",
"quality_evaluation_job_id": "04DE5AD98A02647D83285A36021911C6"
}Changes
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the media type
application/jsonfor the response with the status - info
added the media type
application/jsonfor the response with the status - info
added the optional property
to the response with the status
- info