Skip to main content

Translate document

deprecated

This endpoint has been deprecated and may be removed in future versions of the API.

Use this call to translate a document from the given source language to the defined target language.

Tip: Before sending the document
  • Run the GET /v1/languages endpoint to check the selected source/target language is supported by MT API.
  • Pay special attention to the direction (source-target) of the language pair codes.
  • Check the Documents management guide for restrictions and recommendations.

The translation results are delivered asynchronously via the callbacks URLs provided. Refer to the callbacks guide for more details.

  • When the translation is successfully finished, the callback provides the /:id of the translated document.
    • Usually, the response is returned in around 10 seconds.
  • You can then download it via the GET /v1/documents/download/:job_id endpoint.
Caution

The document is available for download for 1 hour, after that the document is deleted.


Request Body REQUIRED
source BCP-47 REQUIRED

Possible values: 2 ≤ length ≤ 25

Source language code

target BCP-47 REQUIRED

Possible values: 2 ≤ length ≤ 25

Target language code

file binary REQUIRED

File to translate

success_callback_url uri REQUIRED

Possible values: 1 ≤ length ≤ 65536

URL for success callback

error_callback_url uri REQUIRED

Possible values: 1 ≤ length ≤ 65536

URL for error callback

translation_id Translation ID

Possible values: length ≤ 64

Optional ID to identify the translation. It will be returned in the callbacks.

Responses
202

Successful response

Schema OPTIONAL
job_id uuid

Identifier of the started translation. This value can later be used to retrieve the translated file.

401

The access token provided is missing, expired, revoked, malformed, or invalid for other reasons. The client MAY request a new access token and retry the protected resource request.

Schema OPTIONAL
detail Detail

A generic JSON value, typically a string describing the error.

403

The request requires higher privileges than provided by the access token. The request should not be retried.

Schema OPTIONAL
detail Detail

A generic JSON value, typically a string describing the error.

413

Uploaded document is too large

Schema OPTIONAL
detail Detail

The uploaded document is larger than allowed size

422

Unsupported document format

Schema OPTIONAL
detail Detail

Unsupported document format

429

Too many requests in the time interval

Schema OPTIONAL
detail Detail

A generic JSON value, typically a string describing the error.