OpenAPI spec for document translation

This page contains only a set of guides that is auto-generated from DeepL's OpenAPI file.

For more detail about document translation, including information about request parameters, please see the Translate documents entry.

Upload and Translate a Document

post
Authorizations
Body
source_langstring · enumoptional

Language of the text to be translated. If this parameter is omitted, the API will attempt to detect the language of the text and translate it.

Example: ENAvailable options:
target_langstring · enumrequired

The language into which the text should be translated.

Example: DEAvailable options:
filestring · binaryrequired

The document file to be translated. The file name should be included in this part's content disposition. As an alternative, the filename parameter can be used. The following file types and extensions are supported:

  • docx - Microsoft Word Document
  • pptx - Microsoft PowerPoint Document
  • xlsx - Microsoft Excel Document
  • pdf - Portable Document Format
  • htm / html - HTML Document
  • txt - Plain Text Document
  • xlf / xliff - XLIFF Document, version 2.1
  • srt - SRT Document
filenamestringoptional

The name of the uploaded file. Can be used as an alternative to including the file name in the file part's content disposition.

output_formatstringoptional

File extension of desired format of translated file, for example: docx. If unspecified, by default the translated file will be in the same format as the input file.

formalitystring · enumoptional

Sets whether the translated text should lean towards formal or informal language. This feature is only available for certain target languages. Setting this parameter with a target language that does not support formality will fail, unless one of the prefer_... options are used. Possible options are:

  • default (default)
  • more - for a more formal language
  • less - for a more informal language
  • prefer_more - for a more formal language if available, otherwise fallback to default formality
  • prefer_less - for a more informal language if available, otherwise fallback to default formality
Default: defaultExample: prefer_moreAvailable options:
glossary_idstringoptional

A unique ID assigned to a glossary.

Example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7
Responses
{
  "document_id": "04DE5AD98A02647D83285A36021911C6",
  "document_key": "0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A"
}

Check Document Status

post
Authorizations
Path parameters
document_idstringrequired

The document ID that was sent to the client when the document was uploaded to the API.

Example: 04DE5AD98A02647D83285A36021911C6
Body
document_keystringrequired

The document encryption key that was sent to the client when the document was uploaded to the API.

Example: 0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A
Responses
{
  "document_id": "04DE5AD98A02647D83285A36021911C6",
  "status": "translating",
  "seconds_remaining": 20
}

Download translated document

Download Translated Document

post
Authorizations
Path parameters
document_idstringrequired

The document ID that was sent to the client when the document was uploaded to the API.

Example: 04DE5AD98A02647D83285A36021911C6
Body
document_keystringrequired

The document encryption key that was sent to the client when the document was uploaded to the API.

Example: 0CB0054F1C132C1625B392EADDA41CB754A742822F6877173029A6C487E7F60A
Responses

No Content

Last updated