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

# Errors

> Error response shape for OpenAI- and Anthropic-dialect endpoints, and status/code reference.

Error shape follows the dialect of the endpoint you called.

<CodeGroup>
  ```json OpenAI dialect (/v1/chat/completions, /v1/responses, /v1/models) theme={null}
  {
    "error": {
      "message": "Invalid LETHE API key. Open /cli, connect a wallet, and paste the new ltk_ key.",
      "type": "invalid_request_error",
      "code": "invalid_api_key"
    }
  }
  ```

  ```json Anthropic dialect (/v1/messages, /v1/messages/count_tokens) theme={null}
  {
    "type": "error",
    "error": {
      "type": "authentication_error",
      "message": "Invalid LETHE API key. Open /cli, connect a wallet, and paste the new ltk_ key."
    }
  }
  ```
</CodeGroup>

## Status / code reference

| Status | Code              | Meaning                                                                                 |
| ------ | ----------------- | --------------------------------------------------------------------------------------- |
| 400    | `invalid_request` | Malformed or non-object JSON body.                                                      |
| 400    | `invalid_model`   | Unknown model id, or a vision input sent to the text-only `lethe` model.                |
| 401    | `missing_api_key` | No key present in `Authorization`, `x-api-key`, or `api-key`.                           |
| 401    | `invalid_api_key` | Key doesn't resolve to a known identity.                                                |
| 404    | `model_not_found` | `GET /v1/models/{id}` for an id that doesn't exist.                                     |
| 429    | `rate_limited`    | Per-minute burst limit exceeded. See [Rate Limits](/api-reference/rate-limits).         |
| 429    | `quota_exceeded`  | Daily/lifetime quota exhausted. See [Rate Limits](/api-reference/rate-limits).          |
| 503    | `unconfigured`    | Server has no API keys configured (deployment-side issue).                              |
| 5xx    | (varies)          | Upstream provider error. LETHE automatically refunds your quota for the failed request. |

<Note>
  On any upstream `5xx`, LETHE refunds the quota it charged for that request, a failed call doesn't count against your daily limit.
</Note>
