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

# Errors

> What each gateway error means and how to fix it

Gateway errors return a message and a code:

```json theme={null}
{
  "error": {
    "message": "This key can't call this model. Ask the key's owner to add it to the key's models.",
    "code": "model_not_allowed_for_key"
  }
}
```

| Status | Code | Fix |
| - | - | - |
| 401 | `no_api_key` | Send the key in the `Authorization` or `x-api-key` header |
| 401 | `invalid_api_key` | Check the key. If it was revoked or expired, [create a new one](https://docs.getunbound.ai/llm-gateway/keys.md#create-a-key) |
| 400 | `model_not_provided` | Add `model` to the request |
| 400 | `model_not_supported` | The name isn't a model or alias your organization can use. Check it against [`GET /v1/models`](https://docs.getunbound.ai/llm-gateway/models#list-models) |
| 400 | `model_not_allowed_for_key` | Add the model to the key's **Allowed Models** with [Edit Limits](https://docs.getunbound.ai/llm-gateway/keys.md#change-or-revoke-a-key) |
| 400 | `provider_key_missing` | [Connect the provider](https://docs.getunbound.ai/llm-gateway/providers.md) for this model, or point the alias at a connected one |
| 402 | `key_budget_exceeded` | The key used its monthly budget. Raise it with **Edit Limits**, or wait for the reset on the 1st |
| 402 | `application_credits_not_available` | The key's owner reached their [usage budget](https://docs.getunbound.ai/policies/cost-policies.md). An admin can raise it |

On `/v1/messages`, the two 402 errors use the Anthropic error shape and carry only the message.

Errors from the model provider, such as rate limits, pass through with the provider's status and message.


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