Skip to main content
POST
/
v1
/
translate
Translate
curl --request POST \
  --url https://api.nitrotranslate.com/v1/translate \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource": {
    "type": "<string>",
    "data": "<string>",
    "metadata": "<string>"
  },
  "target_languages": [],
  "context": {
    "limit": 1
  },
  "comment": {
    "text": "<string>",
    "attachments": [
      {
        "type": "<string>",
        "data": "<string>"
      }
    ]
  }
}
'
{
  "text": "<string>",
  "resource": {
    "type": "<string>",
    "data": "<string>",
    "metadata": "<string>"
  },
  "volume": 123,
  "orders": [
    {
      "id": 123,
      "source_language": "<string>",
      "target_language": "<string>",
      "snippet": "<string>",
      "volume": 123,
      "price": 123,
      "created_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
source_language
enum<string>
required
Available options:
af,
ar,
az,
be,
bg,
bn,
ca,
cs,
da,
de,
el,
en,
es-ES,
es-MX,
et,
fa,
fi,
fr,
fr-CA,
he,
hi,
hr,
hu,
hy-AM,
id,
is,
it,
ja,
ka,
kk,
ko,
ky,
lt,
lv,
ml-IN,
ms,
my,
nl,
no,
pl,
pt-BR,
pt-PT,
ro,
ru,
sk,
sl,
sr,
sr-CS,
sv-SE,
ta,
tg,
th,
tl,
tr,
te,
uk,
ur-PK,
uz,
vi,
zh-CN,
zh-TW
resource
resource · object
required

The content to be translated. data is interpreted according to its MIME type (e.g. text/plain, text/html, application/json).

target_languages
enum<string>[]
Minimum array length: 1
Available options:
af,
ar,
az,
be,
bg,
bn,
ca,
cs,
da,
de,
el,
en,
es-ES,
es-MX,
et,
fa,
fi,
fr,
fr-CA,
he,
hi,
hr,
hu,
hy-AM,
id,
is,
it,
ja,
ka,
kk,
ko,
ky,
lt,
lv,
ml-IN,
ms,
my,
nl,
no,
pl,
pt-BR,
pt-PT,
ro,
ru,
sk,
sl,
sr,
sr-CS,
sv-SE,
ta,
tg,
th,
tl,
tr,
te,
uk,
ur-PK,
uz,
vi,
zh-CN,
zh-TW
context
context · object

Translation hints applied to an order. All fields are optional.

comment
comment · object

Comment supplied with a translation request (inbound counterpart of the Comment returned on an order).

Response

200 - application/json

Success

text
string

The submitted source text.

resource
resource · object

The submitted resource.

volume
integer<int32>

Billable character volume.

orders
OrderSummary · object[]

One order per target language.