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

# Errors and what to do

> What each LLM Gateway refusal means, and how to fix it.

A refused call costs nothing. The gateway answers in the caller's own format (Anthropic, OpenAI or Gemini), and [Logs](https://platform.xpander.ai/governance/logs) shows the reason in **Status** and **Gateway decisions**. In xpander Chat, the run ends with a card titled *xpander did not send this request*.

![Diagram](https://docs.xpander.ai/images/diagrams/run-llm-gateway-errors-f19b429d.svg)

In short: `401` is the key, `400` a missing model, `403` a block on the model, key, license, plan or account, `402` the organization limit or credits, `429` a budget or rate limit, `503` the gateway, `404` a wrong path.

## Your key

| Status | Message | What to do |
| - | - | - |
| `401` | This credential is not an active xpander key. | The key is wrong, revoked or missing. Check what your coding tool sends, or create one in [AI models & keys](https://chat.xpander.ai/?settings=my-gateway). |
| `401` | This xpander key has expired. | Create a new key in [AI models & keys](https://chat.xpander.ai/?settings=my-gateway). |
| `400` | Name the model to call in the request's model field. | Set `model`. |

## The model

| Status | Message | What to do |
| - | - | - |
| `403` | This model is not enabled for you on the xpander LLM Gateway. | Pick a model from [AI models & keys](https://chat.xpander.ai/?settings=my-gateway), or ask an admin to enable it in [Models](https://platform.xpander.ai/governance/model-access). A model on your own endpoint is called `<provider ID>::<model>`, as `/v1/models` lists. |
| `403` | Model calls for this model or this account are paused by your xpander admin. | Pick another model, or ask your admin. |
| `403` | Your organization's LLM Gateway settings do not allow this kind of provider access for you. | Your [license model](https://docs.xpander.ai/run/llm-gateway/policies.md#license-model) doesn't allow how this call would be paid. Ask your admin. |

## Provider keys and endpoints

An admin fixes all of these in [Models](https://platform.xpander.ai/governance/model-access) ([Providers and keys](https://docs.xpander.ai/run/llm-gateway/providers-and-keys.md)).

| Status | Message | What it means |
| - | - | - |
| `403` | No provider key is set up for this model in your xpander organization. | Add a key for the provider. On Hybrid or Air-Gapped, every provider in use needs your own key, in Models or on the install (`secrets.static`). |
| `403` | Your organization has no ... key on the xpander LLM Gateway for this model. | Add a key for the provider. |
| `403` | Your organization has no ... key stored in xpander for this model. Tools on your computer use the keys stored in xpander, not your own environment's credentials. | Hybrid: people's coding tools go through xpander cloud, which can't use credentials inside your install. Store a key in Models. |
| `403` | The model provider refused the key your organization set up for this model. | The key is revoked, expired or lacks access. Replace it. |
| `403` | Your organization's ... key is stored without its endpoint. | Add the [Azure endpoint](https://docs.xpander.ai/run/llm-gateway/providers-and-keys.md#azure-endpoint). Other models work meanwhile. |
| `403` | The endpoint configured for this model's provider key is not a reachable provider address. | Set a public `https` endpoint ([Model endpoints](https://docs.xpander.ai/run/llm-gateway/providers-and-keys.md#model-endpoints-on-xpander-cloud)). On xpander cloud, saving a private one fails with *Model endpoints are called at public addresses here, so this endpoint was not saved*. |

## Budgets, credits and rate limits

| Status | Message | What to do |
| - | - | - |
| `429` | The daily / weekly / monthly spending limit set for this ... on the xpander LLM Gateway is reached until ... | A [budget](https://docs.xpander.ai/run/llm-gateway/budgets-and-blocks.md) set to **Block** is spent. Wait, or ask an admin to raise it. |
| `402` | Your xpander organization reached its spending limit, so model calls are paused. | An admin raises it in [Budgets](https://platform.xpander.ai/governance/budgets). |
| `402` | Your xpander organization is out of credits, so model calls are paused. | An admin adds credits in billing. |
| `403` | Your xpander account is paused, so model calls are not available. | Contact your xpander admin. |
| `403` | Your xpander organization is not active, so model calls are paused. | An admin reactivates the organization. |
| `429` | The request rate set for this ... is reached. | Retry in a minute. Coding tools and SDKs retry on their own. |
| `429` | Too many calls are running at once for this ... | Retry when one finishes. Coding tools and SDKs retry on their own. |

## Your own Claude plan

| Status | Message | What to do |
| - | - | - |
| `403` | Your own Claude plan is not enabled for this call on the xpander LLM Gateway ... | Your organization doesn't allow it for you, the call isn't from Claude Code, or the model isn't Anthropic's Claude. Sign out of the plan in Claude Code, or ask your admin. |
| `429` | Your Claude plan's usage limit is reached until ..., and plan calls are set to wait for the plan rather than use company models. | Wait, or choose **Continue on company models** in [AI models & keys](https://chat.xpander.ai/?settings=my-gateway) if allowed. |
| `403` | Your Claude login expired. | Run `/login` in Claude Code. |
| `403` | Anthropic did not allow this call on your Claude plan. | Pick another model. |

## The gateway itself

| Status | Message | What to do |
| - | - | - |
| `503` | The LLM Gateway could not load your organization's settings just now. | Retry in a few seconds. |
| `503` | The LLM Gateway could not verify this key just now. | Retry in a few seconds. |
| `503` | The LLM Gateway could not load the provider key for this model just now. | Retry in a few seconds. |
| `404` | The LLM Gateway serves model calls only (messages, chat completions, responses, embeddings, token counting). | Call `/v1/messages` (and `/v1/messages/count_tokens`), `/v1/chat/completions`, `/v1/responses` or `/v1/embeddings`. `/v1/models` lists your models. |
| `403` | This call was routed to a model outside your organization's settings, so it was not sent. | Retry. |

### When the gateway is unavailable

Agents call models only through the gateway, so after 30 seconds without it:

* xpander Chat shows *AI gateway is unavailable. Agents can't run right now. We'll reconnect automatically.*
* New runs are refused, and running ones stop at their next model call, with *This run stopped because the AI gateway is unavailable*.
* Coding tools and SDKs get `503` with a `Retry-After` header.

Nothing is sent to a provider any other way. The gateway usually reconnects within a minute. On a self-hosted install, new runs are refused with *The xpander AI gateway is unavailable right now* until its pods are healthy: `kubectl -n <namespace> get pods -l app=llm-gw` should show two `llm-gw` pods (one on a single-node `install.sh` cluster), each `1/1` and `Running` ([Self-hosted](https://docs.xpander.ai/run/llm-gateway/self-hosted.md)).

## When the provider refuses

If the provider itself refused the call, such as an invalid request or an unknown model, its own error comes back unchanged. In xpander Chat, the card says *The model provider rejected this request*.

## Next steps

> **[Find a refused call in Logs](https://docs.xpander.ai/run/llm-gateway/requests-and-costs.md)**
>
> Read its Gateway decisions.

> **[Add a provider key](https://docs.xpander.ai/run/llm-gateway/providers-and-keys.md)**
>
> Fix a missing or refused key.


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