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

# Errors

> Error response envelope and the full list of error codes.

Every error returns the same JSON envelope; `status` mirrors the HTTP status. Switch on `code`, not
`message` (message text may change).

```json Error envelope theme={null}
{
  "error": {
    "code": "API_KEY_INVALID",
    "message": "API key is invalid",
    "status": 401
  }
}
```

<Info>
  **Errors don't consume credits** — only successful (`2xx`) responses deduct.
</Info>

## Error codes

| Status | `code`                     | When it happens                                                                                          |
| ------ | -------------------------- | -------------------------------------------------------------------------------------------------------- |
| `400`  | `VALIDATION_ERROR`         | A query or path parameter failed validation (wrong type, out of range, malformed).                       |
| `401`  | `API_KEY_MISSING`          | The `X-Api-Key` header was not sent.                                                                     |
| `401`  | `API_KEY_INVALID`          | The API key is not recognized.                                                                           |
| `403`  | `NO_ACTIVE_SUBSCRIPTION`   | The key's account has no active subscription.                                                            |
| `403`  | `ENDPOINT_NOT_AVAILABLE`   | The endpoint is not included in your plan.                                                               |
| `403`  | `PLAN_LIMIT_EXCEEDED`      | The request goes beyond what your current plan allows (e.g. a time range deeper than your plan permits). |
| `404`  | `NOT_FOUND`                | The requested resource does not exist.                                                                   |
| `429`  | `RATE_LIMIT_EXCEEDED`      | The per-key request rate (RPM) was exceeded.                                                             |
| `429`  | `DAILY_CREDITS_EXCEEDED`   | The daily credit allowance is used up.                                                                   |
| `429`  | `MONTHLY_CREDITS_EXCEEDED` | The monthly credit allowance is used up.                                                                 |
| `500`  | `INTERNAL_ERROR`           | An unexpected server error. Retry with backoff; if it persists, contact support.                         |

## Rate limits and retries

`429` responses carry a `Retry-After` header (seconds) — wait that long before retrying. See
[Pricing page](https://cryptorank.io/public-api/pricing?cta=docs) for per-plan rates and allowances.

<Warning>
  Retry only `429` (respect `Retry-After`) and `500`. Other `4xx`
  (`400`/`401`/`403`/`404`) just fail again until you fix the input, key, plan,
  or resource.
</Warning>
