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

# Authentication

> How to authenticate with the Anime Quotes API

# Authentication

The API uses two authentication methods:

## API Key Authentication (for API access)

All quote, anime, and character endpoints require an API key passed via the `X-API-Key` header:

```bash theme={null}
curl -H "X-API-Key: aq_k_a1b2c3d4e5f6..." \
  https://api.aniquotes.myproj.xyz/api/v1/quotes
```

### Key Format

API keys follow the format: `aq_k_` followed by 80 hex characters.

Example: `aq_k_a1b2c3d4e5f6g7h8i9j0...`

### Key Security

* Keys are **hashed** before storage — we never store your full key
* The full key is shown **only once** at creation time
* You can create up to N keys based on your plan (Free: 2, Starter: 5, Pro: 10)
* Unused keys can be revoked from the dashboard

### Error Responses

| Status | Code                     | Meaning                             |
| ------ | ------------------------ | ----------------------------------- |
| 401    | `INVALID_API_KEY`        | Missing or invalid API key          |
| 403    | `SUBSCRIPTION_INACTIVE`  | No active subscription for this key |
| 429    | `RATE_LIMIT_EXCEEDED`    | Per-minute rate limit hit           |
| 429    | `MONTHLY_QUOTA_EXCEEDED` | Monthly request quota exhausted     |

## Session Authentication (for Dashboard)

The developer dashboard uses JWT-based session authentication. This is handled automatically by the dashboard UI and is not needed for API access.
