错误代码
HTTP 状态码
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功 |
| 400 | 请求参数错误 |
| 401 | 认证失败 |
| 403 | 权限不足 |
| 429 | 请求过于频繁 |
| 500 | 服务器错误 |
错误响应格式
json
{
"error": {
"message": "错误描述",
"type": "错误类型",
"code": "错误代码"
}
}常见错误
认证错误
invalid_api_key
json
{
"error": {
"message": "Incorrect API key provided",
"type": "invalid_request_error",
"code": "invalid_api_key"
}
}余额不足
insufficient_quota
json
{
"error": {
"message": "Insufficient quota",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}解决:前往充值 →
限流错误
rate_limit_exceeded
json
{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error",
"code": "rate_limit_exceeded"
}
}解决:稍后重试
