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

# Authentication

> Authenticate BudgetPixel API requests with a bearer API key — create and manage keys in the developer console and pass them in the Authorization header.

Every request to the BudgetPixel API must include an API key as a bearer token:

```
Authorization: Bearer bpx_live_xxx
```

```bash theme={null}
curl https://api.budgetpixel.com/v1/account/credits \
  -H "Authorization: Bearer bpx_live_xxx"
```

## Managing keys

Create, name, and revoke keys from your BudgetPixel account dashboard (the developer
API is in private beta — see [Availability](/introduction#availability)).

* The full secret is shown **once**, at creation. Store it securely; it can't be
  retrieved later (only its prefix is shown afterward, to help you identify it).
* Revoking a key takes effect immediately.
* The developer API is available on every paid plan — **Starter**, **Basic**,
  **Premium**, **Pro** and **Ultra**. On the **Free** plan you can still create keys, and
  they can call one endpoint: [stock image search](/stock-images) (10 credits per
  search). Any other request from a key whose account isn't on an API-enabled plan
  returns `403 api_access_not_enabled`.

## Keeping keys secure

<Warning>
  Treat API keys like passwords. Never embed them in client-side code, mobile apps,
  or public repositories — anyone with your key can spend your credits. Call the API
  from your backend and keep keys in environment variables or a secrets manager.
</Warning>

## Errors

Authentication and authorization failures use the standard
[error envelope](/concepts/async-jobs#errors):

| Status | `code` | Meaning |
| - | - | - |
| 401 | `missing_api_key` | No `Authorization` header. |
| 401 | `invalid_api_key` | Key is unknown or revoked. |
| 403 | `api_access_not_enabled` | Account's plan can't use this endpoint (Free-plan keys can only call `GET /v1/stock/images`). |
| 403 | `account_banned` | Account is banned. |


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