错误
HTTP 错误
invalid_request_error
:您的请求格式或内容存在问题。我们也可能使用此错误类型表示下面未列出的其他 4XX 状态码。authentication_error
:您 的 API 密钥存在问题。permission_error
:您的 API 密钥没有使用指定资源的权限。not_found_error
:未找到请求的资源。request_too_large
:请求超过了允许的最大字节数。rate_limit_error
:您的账户已达到速率限制。api_error
:Anthropic 系统内部发生了意外错误。overloaded_error
:Anthropic 的 API 暂时过载。错误格式
error
对象,该对象始终包含 type
和 message
值。例如:{
"type": "error",
"error": {
"type": "not_found_error",
"message": "The requested resource could not be found."
}
}
type
值可能会随时间增加。请求 ID
request-id
标头。此标头包含类似 req_018EeWyXxfu5pfWkrYcMdjWG
的值。当就特定请求联系支持时,请包含此 ID 以帮助我们快速解决您的问题。x-request-id
标头的值:Python
TypeScript
修改于 2025-02-25 07:54:41