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.
Pass the API key with curl’s -u flag, leaving the password empty (note the
trailing colon):
curl https://api.nitrotranslate.com/v1/account \
-u "apikey:"
This sends an Authorization: Basic <base64(apikey:)> header — the API key
followed by a colon with nothing after it. You can also set the header
directly:
curl https://api.nitrotranslate.com/v1/account \
-H "Authorization: Basic <base64(apikey:)>"
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:
curl https://api.nitrotranslate.com/v1/account \
-H "Authorization: Bearer <apikey>"
Payment
Endpoints that draw down funds — such as
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:
curl https://api.nitrotranslate.com/v1/translate \
-H "Authorization: Payment <credential>" \
-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, where a first request
without an Authorization header returns a 402 challenge and you retry with
the Payment credential.