Skip to main content
POST
/
v1
/
calculate
Calculate
curl --request POST \
  --url https://api.nitrotranslate.com/v1/calculate \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource": {
    "type": "<string>",
    "data": "<string>",
    "metadata": "<string>"
  },
  "target_languages": []
}
'
[
  {
    "source_language": "<string>",
    "target_language": "<string>",
    "volume": 123,
    "price": 123
  }
]

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

Response

200 - application/json

Success

source_language
string
target_language
string
volume
integer<int32>

Billable character volume.

price
number<double>

Estimated price in US dollars.