# Agentic Flow
Source: https://docs.nitrotranslate.com/agentic-flow
Pay per request with the Machine Payments Protocol (MPP) — no account or balance required.
For AI agents. No account or balance — you pay per request using the
**Machine Payments Protocol (MPP)**, with any MPP-compatible provider.
**US cards only.** Payment in this flow works only with a **US-issued card**.
Otherwise use authorization — see [Authentication](/authentication).
**`402` is not an error.** It's the payment step — always retry with a payment
credential.
## Base URL
```
https://api.nitrotranslate.com
```
## Overview
| Step | Request | Response |
| ------------ | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **1. Order** | `POST /v1/translate` — no `Authorization` header | `402 Payment Required` + `WWW-Authenticate: Payment` challenge |
| **2. Pay** | Decode the charge, get a payment token from your MPP provider, build the credential (base64url) | — (handled by the provider) |
| **3. Retry** | `POST /v1/translate` — same body + `Authorization: Payment ` | `200 OK` + order IDs + `Resource-Access-Token` |
| **4. Poll** | `GET /v1/orders/{id}` — `Authorization: Bearer `; repeat every \~10s | `status`: `QUEUE → IN_PROGRESS → DONE`; `target_text` when `DONE` |
The retry body must be **byte-for-byte identical** to step 1 — the server
checks the SHA-256 digest from the challenge.
**Save your Resource-Access-Token.** The server returns it as a response
header in step 3. Use it as `Authorization: Bearer ` to retrieve
your orders — [`GET /orders/{id}`](/api-reference/orders/get) and
[`GET /orders`](/api-reference/orders/list). The token does not expire.
Full request/response examples are in the
[Translate](/api-reference/translation/translate) reference.
# Get Account
Source: https://docs.nitrotranslate.com/api-reference/account/get
GET /v1/account
Retrieve account details (balance and reserved funds).
# Delete Order
Source: https://docs.nitrotranslate.com/api-reference/orders/delete
DELETE /v1/orders/{id}
Remove an order (only while in QUEUE status).
# Get Order
Source: https://docs.nitrotranslate.com/api-reference/orders/get
GET /v1/orders/{id}
Fetch a single order with its full details.
# List Orders
Source: https://docs.nitrotranslate.com/api-reference/orders/list
GET /v1/orders
List orders, newest first by default, with pagination.
# Overview
Source: https://docs.nitrotranslate.com/api-reference/overview
The NitroTranslate human translation API.
The NitroTranslate API lets you estimate translation costs, submit content for
human translation, track the resulting orders, and inspect pricing and account
balance.
## Base URL
All endpoints are served under:
```
https://api.nitrotranslate.com
```
## Services
| Service | Description |
| ----------------------------------------- | ------------------------------------------------- |
| [Account](/api-reference/account) | Retrieve account balance and reserved funds. |
| [Translation](/api-reference/translation) | Estimate cost and submit content for translation. |
| [Orders](/api-reference/orders) | List, fetch, and delete translation orders. |
| [Rates](/api-reference/rates) | Current per-language-pair pricing. |
## Authentication
All requests must be authenticated. See [Authentication](/authentication) for
the supported schemes.
# List Rates
Source: https://docs.nitrotranslate.com/api-reference/rates/list
GET /v1/rates
Current pricing rates for all supported language pairs.
# Calculate
Source: https://docs.nitrotranslate.com/api-reference/translation/calculate
POST /v1/calculate
Estimate translation cost per target language.
# Translate
Source: https://docs.nitrotranslate.com/api-reference/translation/translate
POST /v1/translate
Submit content for translation and create orders.
# Authentication
Source: https://docs.nitrotranslate.com/authentication
How to authenticate requests to the NitroTranslate API.
Every request to the NitroTranslate API must be authenticated using the
`Authorization` header. The API supports three schemes.
## Basic
The Nitro API uses HTTP Basic authentication where your **API key is the
username** and the password is left blank. API keys are generated per account
and managed on the
[Settings page](https://app.nitrotranslate.com/customer/settings).
Pass the API key with curl's `-u` flag, leaving the password empty (note the
trailing colon):
```bash theme={null}
curl https://api.nitrotranslate.com/v1/account \
-u "apikey:"
```
This sends an `Authorization: Basic ` header — the API key
followed by a colon with nothing after it. You can also set the header
directly:
```bash theme={null}
curl https://api.nitrotranslate.com/v1/account \
-H "Authorization: Basic "
```
When you generate an API key, you can just copy the ready-made
`Authorization` header value instead of Base64-encoding it yourself.
## Bearer
The same API key can also be passed as a bearer token, which is often more
convenient for server-to-server integrations:
```bash theme={null}
curl https://api.nitrotranslate.com/v1/account \
-H "Authorization: Bearer "
```
## Payment
Endpoints that draw down funds — such as
[Translate](/api-reference/translation/translate) — accept an **MPP payment
authorization** in place of standing account credentials. The credential is
sent on the same `Authorization` header with the `Payment` scheme:
```bash theme={null}
curl https://api.nitrotranslate.com/v1/translate \
-H "Authorization: Payment " \
-H "Content-Type: application/json" \
-d '{ "source_language": "en", "target_languages": ["de"], "resource": { "type": "text/plain", "data": "Hello" } }'
```
Use Payment authorization when settling an order's cost with a per-request
payment credential rather than against your prefunded account balance. This is
the basis of the no-account [Agentic flow](/agentic-flow), where a first request
without an `Authorization` header returns a `402` challenge and you retry with
the `Payment` credential.
# Errors
Source: https://docs.nitrotranslate.com/errors
HTTP status codes and error responses returned by the NitroTranslate API.
The NitroTranslate API uses conventional HTTP status codes to indicate the
success or failure of a request.
## HTTP status codes
| Code | Meaning |
| ----- | --------------------------------------------------------------------------- |
| `400` | Bad Request — Something went wrong; see the response body for details. |
| `401` | Unauthorized — Invalid API key. |
| `403` | Forbidden — The requested resource is hidden for administrators only. |
| `404` | Not Found — The specified resource could not be found. |
| `405` | Method Not Allowed — You tried to access a resource with an invalid method. |
| `406` | Not Acceptable — You requested a format that isn't JSON. |
| `413` | Request Entity Too Large — Request body exceeds the 30 MB limit. |
| `429` | Too Many Requests — Rate limiting applies. |
| `500` | Internal Server Error — A problem occurred on our end. |
| `503` | Service Unavailable — Temporarily offline for maintenance. |
## Error responses
A `400` response returns an error object with a `code`, a human-readable
`description`, and optional `parameters`:
```json theme={null}
{
"code": "INSUFFICIENT_FUNDS",
"description": "Account lacks funds to place an order",
"parameters": {}
}
```
### Error codes
| Code | Meaning |
| -------------------- | ---------------------------------------------------------- |
| `INSUFFICIENT_FUNDS` | The account lacks the funds to place the order. |
| `WRONG_ORDER_STATUS` | The order isn't in `QUEUE` status, so it can't be deleted. |
| `LANGUAGE_NOT_FOUND` | No appropriate language pair is available. |
# Introduction
Source: https://docs.nitrotranslate.com/introduction
Welcome to the NitroTranslate human translation API.
Welcome to the NitroTranslate API! You can use our API to access NitroTranslate
endpoints — estimate translation costs, submit content for human translation,
track the resulting orders, and inspect pricing and your account balance.
## Base URL
```
https://api.nitrotranslate.com
```
## Getting started
Sign up at [app.nitrotranslate.com](https://app.nitrotranslate.com/signup)
and top up your balance.
Create an API key on the
[Settings page](https://app.nitrotranslate.com/customer/settings).
Pass your API key on every request. See
[Authentication](/authentication).
Estimate a job with [Calculate](/api-reference/translation/calculate), then
submit it with [Translate](/api-reference/translation/translate).
## Need help?
Contact us at [nitro@alconost.com](mailto:nitro@alconost.com).
# Supported Languages
Source: https://docs.nitrotranslate.com/languages
Language codes accepted by the NitroTranslate API.
Below are the supported language codes and their corresponding language names.
You must specify the **language code** (not the name) when placing an order.
Both `source_language` and `target_languages` accept codes from this same list.
| Code | Language |
| ------- | --------------------- |
| `af` | Afrikaans |
| `ar` | Arabic |
| `az` | Azerbaijani |
| `be` | Belarusian |
| `bg` | Bulgarian |
| `bn` | Bengali |
| `ca` | Catalan |
| `cs` | Czech |
| `da` | Danish |
| `de` | German |
| `el` | Greek |
| `en` | English |
| `es-ES` | Spanish (Spain) |
| `es-MX` | Spanish (Mexico) |
| `et` | Estonian |
| `fa` | Persian |
| `fi` | Finnish |
| `fr` | French |
| `fr-CA` | French (Canada) |
| `he` | Hebrew |
| `hi` | Hindi |
| `hr` | Croatian |
| `hu` | Hungarian |
| `hy-AM` | Armenian |
| `id` | Indonesian |
| `is` | Icelandic |
| `it` | Italian |
| `ja` | Japanese |
| `ka` | Georgian |
| `kk` | Kazakh |
| `ko` | Korean |
| `ky` | Kyrgyz |
| `lt` | Lithuanian |
| `lv` | Latvian |
| `ml-IN` | Malayalam |
| `ms` | Malay |
| `my` | Burmese |
| `nl` | Dutch |
| `no` | Norwegian |
| `pl` | Polish |
| `pt-BR` | Portuguese (Brazil) |
| `pt-PT` | Portuguese (Portugal) |
| `ro` | Romanian |
| `ru` | Russian |
| `sk` | Slovak |
| `sl` | Slovene |
| `sr` | Serbian (Cyrillic) |
| `sr-CS` | Serbian (Latin) |
| `sv-SE` | Swedish |
| `ta` | Tamil |
| `te` | Telugu |
| `tg` | Tajik |
| `th` | Thai |
| `tl` | Tagalog |
| `tr` | Turkish |
| `uk` | Ukrainian |
| `ur-PK` | Urdu (Pakistan) |
| `uz` | Uzbek |
| `vi` | Vietnamese |
| `zh-CN` | Chinese (Simplified) |
| `zh-TW` | Chinese (Traditional) |