Skip to content

错误码

所有错误以 OpenAI 兼容格式返回:HTTP 状态码 + JSON 错误体,其中 type 是错误大类、code 是具体错误码。

json
{
  "error": {
    "message": "API Key 缺失、无效或已禁用",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

错误码表

HTTPtypecode含义处置建议
401authentication_errorinvalid_api_keyAPI Key 缺失、无效或已禁用检查 Authorization 头与控制台 Key 状态
404invalid_request_errormodel_not_found模型不存在或未上架对照定价页可用模型列表
400invalid_request_errorinvalid_request_error请求体不是合法 JSON 或缺少 model检查请求格式与必填字段
429insufficient_quotaquota_exceeded当日 token 配额已用尽次日自动恢复
402insufficient_quotainsufficient_balance余额不足前往控制台充值后重试
5xx上游模型服务异常稍后重试,持续失败请联系平台

Token Factory · 国产合规 AI Gateway