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

# 错误码

> 错误响应格式与 HTTP 状态码。

错误以 JSON 返回，包含一个 `error` 对象：

```json theme={null}
{
  "error": {
    "message": "…",
    "type": "…",
    "code": "…"
  }
}
```

| 状态码 | 含义 |
| - | - |
| `400` | 请求参数错误 |
| `401` | API Key 无效或未提供 |
| `404` | 接口路径不存在，通常是地址拼错了 |
| `429` | 请求频率超限 |
| `500` | 服务器内部错误 |
| `503` | 该模型当前没有可用的上游，或模型名不存在。可以稍后重试，或换一个模型 |

error.message 的具体文字可能变化，代码里请按 HTTP 状态码处理，不要匹配 message 的文字。


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