Error codes

Search by error code or HTTP status. Model APIs usually use error.code. Account APIs may use code or detail.code.

The published explanations below are in Chinese.

72 matching errors

Error codeHTTPExplanation and guide
missing_auth401缺少 Authorization 请求头Read the guide
invalid_auth401Authorization 格式非法Read the guide
invalid_api_key401API Key 无效或已停用Read the guide
env_mismatch401该 API Key 不适用于当前环境Read the guide
rate_limit_exceeded429请求过于频繁,请按 Retry-After 退避重试Read the guide
upstream_error5xx上游服务异常
balance_insufficient402余额不足Read the guide
org_balance_unavailable402该组织尚未开通余额账户
budget_exceeded402组织预算已超限
content_policy400内容不符合内容政策
ip_blocked403IP 因多次认证失败被临时封禁
insufficient_quota402额度不足Read the guide
capability_not_supported404该模型的供应商不支持该能力(如上下文缓存)
reasoning_payload_not_transferable400会话中携带的推理载荷(如 thinking 块)无法转发给本次实际调用的上游;见下方说明
catalog_unavailable503模型目录暂时不可用(平台侧故障,不代表你没有权限)
tool_not_carryable400提供的工具定义在当前路由下没有任何上游可以承载Read the guide
model_not_found404模型不存在Read the guide
no_routable_sku404模型存在,但此刻没有可用的供应商Read the guide
tier_unavailable404该 Key 开启了「只使用所选规格」,所选规格下暂无可用货源;请加选规格或关闭该开关Read the guide
plan_paused_distributor402套餐因销售方经营账户暂停而不可用
content_not_supported400当前路由到的货源不接受这次请求携带的媒体类型/形状
asset_required400当前可用的规格和路由要求媒体输入使用已登记的素材。登记后等到 active,用返回的 ref 重试。Read the guide
asset_not_found400该素材不存在或当前账号不可用。Read the guide
asset_not_active400素材还未就绪,先查询登记状态。Read the guide
asset_supplier_mismatch400本次引用的素材无法在同一条供货路径使用。Read the guide
asset_tier_conflict400素材的可用规格与 Key 的规格偏好冲突。Read the guide
asset_supplier_unavailable503该素材当前没有可用的生成路由。Read the guide
draft_task_invalid400样片任务不可引用。核对任务 ID、状态和创建时的 Key。
draft_task_unsupported_combination400仅支持一条样片引用,且不能与平台素材句柄混用。
draft_task_tier_conflict400样片支持的供货规格与 Key 的规格偏好冲突。
asset_type_mismatch400引用的平台素材实际类型与请求中声明的类型不符(例如把图片素材当视频引用)Read the guide
asset_model_mismatch400引用的平台素材没有绑定到本次请求的模型Read the guide
bad_request400请求不合法
upstream_unreachable502上游不可达
internal_error500/502服务内部错误
cancelled503请求已取消(客户端在等待期间自行断开,不代表平台故障)
service_unavailable503服务暂时不可用,请重试
invalid_token401令牌无效
token_revoked401令牌已被吊销
token_stale_password401密码已变更,令牌失效
invalid_refresh_token401刷新令牌无效
refresh_token_revoked401刷新令牌已被吊销
refresh_token_stale_password401密码已变更,刷新令牌失效
invalid_credentials401账号或密码错误(登录场景;与 API Key 无效是两回事,见下方说明)
account_suspended403账号已被封禁或注销
account_deleted401账号已注销
two_factor_required401需要二次验证
email_already_registered409邮箱已注册
email_already_verified409邮箱已验证
invalid_verification_code400验证码无效或已过期
invalid_reset_token400重置令牌无效或已过期
invalid_current_password401当前密码错误
current_password_required400修改已有密码需提供当前密码
user_not_found404用户不存在
rate_limit_exceeded429操作过于频繁,请稍后再试Read the guide
email_send_failed502邮件发送失败,请稍后重试
api_key_not_found404API Key 不存在
organization_not_found404组织不存在
org_membership_required403你不是该组织成员,不能将其设为扣费源
org_permission_denied403你在该组织没有创建 Key 的权限
invalid_org_id422org_id 格式非法
order_not_found404订单不存在
payment_provider_error502支付服务异常
invalid_topup_request400充值请求参数非法
invalid_json400请求体不是合法 JSON
client_key_required401缺少 Client Key
invalid_client_key_format401Client Key 格式非法
invalid_client_key401Client Key 无效或已吊销
app_not_found401应用不存在或已停用
cache_unavailable503服务暂时不可用,请重试
external_identity_claimed409该外部身份已被认领,须由用户本人登录获取完整平台会话
sales_plan_unavailable409套餐当前不可购买,例如定价条件暂未就绪。请稍后重试或联系支持。
Read the full error code reference

用返回的错误码和 HTTP 状态定位问题。客户端按结构中的 code 分支,显示文案可帮助排查。

一、稳定性承诺

元素能否变
code 取值不会——一旦发布就不再更改,你可以据此写分支
message / detail 文案可能改,只影响展示,不要用它做判断
HTTP 状态码一般不改;如需改动会按破坏性变更处理
新增 code随时可能发生——建议对未识别的 code 做兜底处理,不要求穷举

二、两种信封

调用模型走的数据面(https://staging-dp.taotoken.io/v1)和管理账号走的控制面是两个不同的 API 面,错误信封形状不同:

数据面(OpenAI 兼容):

JSON
{ "error": { "message": "...", "type": "authentication_error", "code": "invalid_api_key" } }

控制面(账户/管理接口):

JSON
{ "detail": "当前语言文案", "code": "invalid_credentials", "detail_en": "英文文案" }

具体接口可能使用其它错误结构。例如火山兼容路径用 error.code 表示火山错误码,平台分类可出现在 error.reason,部分账户 API 将错误码放在 detail.code。

三、模型调用(数据面)

codeHTTP说明
missing_auth401缺少 Authorization 请求头
invalid_auth401Authorization 格式非法
invalid_api_key401API Key 无效或已停用
env_mismatch401该 API Key 不适用于当前环境
rate_limit_exceeded429请求过于频繁,请按 Retry-After 退避重试
upstream_error5xx上游服务异常
balance_insufficient402余额不足
org_balance_unavailable402该组织尚未开通余额账户
budget_exceeded402组织预算已超限
content_policy400内容不符合内容政策
ip_blocked403IP 因多次认证失败被临时封禁
insufficient_quota402额度不足
capability_not_supported404该模型的供应商不支持该能力(如上下文缓存)
reasoning_payload_not_transferable400会话中携带的推理载荷(如 thinking 块)无法转发给本次实际调用的上游;见下方说明
catalog_unavailable503模型目录暂时不可用(平台侧故障,不代表你没有权限)
tool_not_carryable400提供的工具定义在当前路由下没有任何上游可以承载
model_not_found404模型不存在
no_routable_sku404模型存在,但此刻没有可用的供应商
tier_unavailable404该 Key 开启了「只使用所选规格」,所选规格下暂无可用货源;请加选规格或关闭该开关
plan_paused_distributor402套餐因销售方经营账户暂停而不可用
content_not_supported400当前路由到的货源不接受这次请求携带的媒体类型/形状
asset_required400当前可用的规格和路由要求媒体输入使用已登记的素材。登记后等到 active,用返回的 ref 重试。
asset_not_found400该素材不存在或当前账号不可用。
asset_not_active400素材还未就绪,先查询登记状态。
asset_supplier_mismatch400本次引用的素材无法在同一条供货路径使用。
asset_tier_conflict400素材的可用规格与 Key 的规格偏好冲突。
asset_supplier_unavailable503该素材当前没有可用的生成路由。
draft_task_invalid400样片任务不可引用。核对任务 ID、状态和创建时的 Key。
draft_task_unsupported_combination400仅支持一条样片引用,且不能与平台素材句柄混用。
draft_task_tier_conflict400样片支持的供货规格与 Key 的规格偏好冲突。
asset_type_mismatch400引用的平台素材实际类型与请求中声明的类型不符(例如把图片素材当视频引用)
asset_model_mismatch400引用的平台素材没有绑定到本次请求的模型
bad_request400请求不合法
upstream_unreachable502上游不可达
internal_error500/502服务内部错误
cancelled503请求已取消(客户端在等待期间自行断开,不代表平台故障)
service_unavailable503服务暂时不可用,请重试

reasoning_payload_not_transferable:当会话历史里携带了上游签发的推理载荷(如 Anthropic 的 thinking 块)、这次请求确实开启了推理,且候选供应商全部用尽而无法找到能验证该载荷的上游时返回。这类载荷带有签名校验,平台不会伪造或用其它内容顶替,因此选择明确报错而不是静默丢弃或转发一个必然失败的请求。

四、账户与认证

codeHTTP说明
invalid_token401令牌无效
token_revoked401令牌已被吊销
token_stale_password401密码已变更,令牌失效
invalid_refresh_token401刷新令牌无效
refresh_token_revoked401刷新令牌已被吊销
refresh_token_stale_password401密码已变更,刷新令牌失效
invalid_credentials401账号或密码错误(登录场景;与 API Key 无效是两回事,见下方说明)
account_suspended403账号已被封禁或注销
account_deleted401账号已注销
two_factor_required401需要二次验证
email_already_registered409邮箱已注册
email_already_verified409邮箱已验证
invalid_verification_code400验证码无效或已过期
invalid_reset_token400重置令牌无效或已过期
invalid_current_password401当前密码错误
current_password_required400修改已有密码需提供当前密码
user_not_found404用户不存在
rate_limit_exceeded429操作过于频繁,请稍后再试
email_send_failed502邮件发送失败,请稍后重试

invalid_credentials 与 invalid_api_key 是两个不同的码,不要混用:前者是登录账号/密码错误(用控制台的人会遇到),后者是 API Key 无效或已停用(用 SDK 调模型的人会遇到)。两者对应的下一步动作不同——改密码,还是换 Key——所以平台故意不把它们合并成一个码。

五、API Key 管理

codeHTTP说明
api_key_not_found404API Key 不存在
organization_not_found404组织不存在
org_membership_required403你不是该组织成员,不能将其设为扣费源
org_permission_denied403你在该组织没有创建 Key 的权限
invalid_org_id422org_id 格式非法

六、充值

codeHTTP说明
order_not_found404订单不存在
payment_provider_error502支付服务异常
invalid_topup_request400充值请求参数非法
invalid_json400请求体不是合法 JSON

七、SDK 接入

codeHTTP说明
client_key_required401缺少 Client Key
invalid_client_key_format401Client Key 格式非法
invalid_client_key401Client Key 无效或已吊销
app_not_found401应用不存在或已停用
cache_unavailable503服务暂时不可用,请重试
external_identity_claimed409该外部身份已被认领,须由用户本人登录获取完整平台会话

遇到本页未列出的 code,请按未知值处理(不要因此中断集成),并欢迎反馈给我们补充登记。

八、套餐购买

codeHTTP说明
sales_plan_unavailable409套餐当前不可购买,例如定价条件暂未就绪。请稍后重试或联系支持。

下一步

媒体输入与登记 · 视频创建与样片 · 客户端工具兼容性