> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nitrotranslate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 <base64(apikey:)>` 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 <base64(apikey:)>"
```

<Tip>
  When you generate an API key, you can just copy the ready-made
  `Authorization` header value instead of Base64-encoding it yourself.
</Tip>

## 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 <apikey>"
```

## 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 <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](/agentic-flow), where a first request
without an `Authorization` header returns a `402` challenge and you retry with
the `Payment` credential.
