> ## 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.