跳转到主要内容
当请求失败时,API 会返回包含错误信息的 JSON 响应:
{
    "error": {
        "type": "content_filter",
        "message": "The request was rejected because it was considered high risk"
    }
}

错误列表

400 — 请求错误

error typeerror message详细描述
content_filterThe request was rejected because it was considered high risk内容审查拒绝,您的输入或生成内容可能包含不安全或敏感内容,请您避免输入易产生敏感内容的提示语
invalid_request_errorInvalid request: {error_details}请求无效,通常是您请求格式错误或者缺少必要参数,请检查后重试
invalid_request_errorInput token length too long请求中的 tokens 长度过长,请求不要超过模型 tokens 的最长限制
invalid_request_errorYour request exceeded model token limit : {max_model_length}请求的 tokens 数和设置的 max_tokens 加和超过了模型规格长度,请检查请求体的规格或选择合适长度的模型
invalid_request_errorInvalid purpose: only ‘file-extract’ accepted请求中的目的(purpose)不正确,当前只接受 ‘file-extract’,请修改后重新请求
invalid_request_errorFile size is too large, max file size is 100MB, please confirm and re-upload the file上传的文件大小超过了限制,请重新上传
invalid_request_errorFile size is zero, please confirm and re-upload the file上传的文件大小为 0,请重新上传
invalid_request_errorThe number of files you have uploaded exceeded the max file count {max_file_count}, please delete previous uploaded files上传的文件总数超限,请删除不用的早期的文件后重新上传

401 — 认证错误

error typeerror message详细描述
invalid_authentication_errorInvalid Authentication鉴权失败,请检查 API Key 是否正确,请修改后重试
incorrect_api_key_errorIncorrect API key provided鉴权失败,请检查 API Key 是否提供以及是否正确,请修改后重试
如果您在 platform.kimi.ai 平台申请的 Key 用在了 platform.kimi.com 平台(或反之),也会收到 401 错误。两个平台的 Key 完全独立,不能混用。

403 — 权限错误

error typeerror message详细描述
permission_denied_errorThe API you are accessing is not open访问的 API 暂未开放
permission_denied_errorYou are not allowed to get other user info访问其他用户信息的行为不被允许,请检查

404 — 资源不存在

error typeerror message详细描述
resource_not_found_errorNot found the model {model-id} or Permission denied不存在此模型或者没有授权访问此模型,请检查后重试

429 — 速率限制 / 额度不足

error typeerror message详细描述
engine_overloaded_errorThe engine is currently overloaded, please try again later当前并发请求过多,节点限流中,请稍后重试;建议充值升级 tier,享受更丝滑的体验
exceeded_current_quota_errorYour account {organization-id}<{ak-id}> is suspended, please check your plan and billing details账户余额不足,已停用,请检查您的账户余额
exceeded_current_quota_errorYou exceeded your current token quota: <{organization_id}> {token_credit}, please check your account balance账户额度不足,请检查账户余额,保证账户余额可匹配您 tokens 的消耗费用后重试
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization max concurrency: {Concurrency}, please try again after {time} seconds请求触发了账户并发个数的限制,请等待指定时间后重试
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization max RPM: {RPM}, please try again after {time} seconds请求触发了账户 RPM 速率限制,请等待指定时间后重试
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization TPM rate limit, current:{current_tpm}, limit:{max_tpm}请求触发了账户 TPM 速率限制,请等待指定时间后重试
rate_limit_reached_errorYour account {organization-id}<{ak-id}> request reached organization TPD rate limit, current:{current_tpd}, limit:{max_tpd}请求触发了账户 TPD 速率限制,请等待指定时间后重试

500 — 服务端错误

error typeerror message详细描述
server_errorFailed to extract file: {error}解析文件失败,请重试
unexpected_outputinvalid state transition内部错误,请联系管理员

排障建议

  • 收到 401:先确认是否使用了正确平台的 API Key
  • 收到 429:考虑降低并发或升级用户等级,详见充值与限速
  • 收到 500:请稍后重试,如持续出现请联系支持团队