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

# Authentication

> API Authentication Method

## Bearer Token

All `/api/v1/*` endpoints require Bearer Token authentication:

```bash theme={null}
Authorization: Bearer YOUR_API_SECRET
```

<Note>
  You can obtain your API Key from the [API Dashboard](https://api.maxapi.io/dashboard).
</Note>

## Example

```bash theme={null}
curl -X POST https://api.maxapi.io/api/v1/task/submit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_SECRET" \
  -d '{"model": "nano-banana", "input": {"prompt": "hello"}}'
```

## Error Response

If authentication fails, the API will return:

```json theme={null}
{
  "code": 401,
  "msg": "unauthorized"
}
```
