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

# 错误码

下表列出 OpenAI 兼容接口常见的平台错误码。上游服务商可能返回额外错误码，客户端也应处理未知错误码。Anthropic Messages 接口返回 Anthropic 兼容的错误格式。

```json theme={null}
{
  "error": {
    "message": "Insufficient balance",
    "type": "invalid_request_error",
    "code": "personal_balance_insufficient"
  }
}
```

| 错误码 | 分类 | 描述 |
| - | - | - |
| `invalid_api_key` | 请求 | API Key 缺失或无效 |
| `invalid_json` | 请求 | 请求体不是有效的 JSON |
| `invalid_request` | 请求 | 请求参数或字段校验失败 |
| `personal_balance_insufficient` | 计费 | 个人账户余额不足，请先充值 |
| `guardrail_model_not_allowed` | 安全策略 | 请求的模型不在当前策略允许范围内 |
| `guardrail_budget_exceeded` | 安全策略 | 已超出安全策略预算限制 |
| `rate_limit_exceeded` | 限流 | 超出速率限制或并发限制 |
| `route_unavailable` | 路由 | 当前没有可用的路由目标 |
| `no_channel` | 路由 | 没有符合当前请求条件的可用渠道 |
| `upstream_error` | 上游 | 上游服务请求失败，请稍后重试 |


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