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

# Authentication

> API keys, how to send them, and what they can call.

## API keys

Blon API keys start with `blon_api_`. Create and revoke them in the [developer console](https://blon.ai/console/keys). A key belongs to a workspace that has the API platform turned on, and every request it makes is pinned to that workspace.

Send the key as a Bearer token:

```bash theme={null}
curl https://api.blon.ai/v1/balance \
  -H "Authorization: Bearer $BLON_API_KEY"
```

The `x-api-key` header is also accepted.

> [!WARNING]
>
> Keep keys on your server. Never ship them in a browser or mobile app, and never send them to an upload URL.

## Dollars and credits

| Caller | Wallet | Amounts shown as |
| - | - | - |
| `blon_api_` key | The workspace's API balance | `USD`, dollar strings such as `"0.0042"` |
| CLI sign-in, MCP | Your Blon account's credits | `CREDITS` |

Every amount the API returns, including balance, estimates, job `cost`, usage and error `details`, uses the caller's currency.

## Scopes

The scopes you tick when creating a key decide which endpoints it can call. A key without the scope gets `403 insufficient_scope`.

| Scope | Endpoints |
| - | - |
| `read` | `GET /jobs`, `GET /jobs/{id}`, `GET /models`, `GET /models/{id}`, `GET /balance`, `GET /usage` |
| `generate` | `POST /estimate`, `POST /jobs`, `POST /jobs/{id}/cancel`, `POST /uploads`, `POST /uploads/complete` |

## Errors

A missing, revoked or unknown key returns `401`:

```json theme={null}
{
  "error": {
    "code": "unauthorized",
    "message": "…",
    "request_id": "req_…",
    "retryable": false,
    "retry_after_seconds": null,
    "details": null
  }
}
```

The `blon` CLI and MCP do not use API keys. They sign in with your Blon account; see [CLI](https://docs.blon.ai/cli.md) and [MCP](https://docs.blon.ai/how-to/mcp.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.