POST
/
translate
curl --request POST \
  --url https://client.camb.ai/apis/translate \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "source_language": 1,
  "target_language": 1,
  "texts": [
    "<string>"
  ],
  "age": 123,
  "formality": 1,
  "gender": 0,
  "chosen_dictionaries": null
}'
{
  "task_id": "<string>"
}

This endpoint initiates a translation task, converting a list of texts into a specified target language, returning a task_id. To check the status of the task, the /translate/{task_id} endpoint can be polled.

Authorizations

x-api-key
string
header
required

The x-api-key is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.

Body

application/json

Response

200
application/json
Successful Response

A JSON that contains unique identifier for the task. This is used to query the status of the translation task that is running. It is returned when a create request is made for translation.