Translate a text file

Submit text for translation.

The following formats are supported (specified via the Content-Type header):

  • text/plain - Simple UTF-8 encoded text.
  • application/subrip - A UTF-8 encoded SRT file.
  • application/json - A json object or array. All string values within the json object or array are translated.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

User request completion callback

When submitting a request, an optional HTTP callback can be specified which will be invoked when the request completes or fails. The callback is an HTTP POST to the exact URL provided. Only one attempt is made to reach the URL provided. The contents of the HTTP request match the response from the Querying a request status and retrieving results above.

Headers

  • x-requestid: Contains the request_id received when the request was submitted
  • x-status: One of the following indicating the status of the request:
StatusDescription
“Completed”The request has finished processing and the user callback, if provided has been called.
“Failed”An error occurred processing the request.
  • x-error: If the request failed, this would contain an error message.
  • x-userdata: This will contain the user data supplied with the original request.

Body

If the status is “Completed” the body of the request contains the results from the translation. If the status is “Failed” the body of the request contains the same error message provided in the x-error header.

Using meta controls

One or more meta control values are provided in the meta_controls query parameter. The control values are provided using the following structure:

{control}:{value},{control}:{value},etc.

E.g.
meta_controls=gender:female,genre:newswire

The meta_controls available for a model is provided in the meta_controls array of the model description returned by the Query available translation models method.

Details

Path Params
string
required

The 'translation model' to use. You can use either the services endpoint or the translate/models endpoint or retrieve the available models.

Query Params
string

[optional] Provide a list of meta controls to refine the translation output.

string

Specify the glossary to use during translation.

Body Params
string

The body of the POST contains the utf-8 text to be translated.

Headers
string
required

API Key

string

[optional] A user HTTP callback URL which will be invoked to notify the user when the request completes. See “User request completion callback” for further description.

string

[optional] Any text data the caller wants to associate with this request. This can be used to link this request with some other external tracking information.

int32
Defaults to 50

[optional] An integer priority level between 1 (low priority) and 100 (high priority) for this request. Additional charges may be applied to jobs with higher priority values. Default value is 50.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json