Skip to content

错误码

错误响应包含稳定 code 和面向人的 message。客户自身限制使用 HTTP 429;平台容量或关键资源不足使用 HTTP 503。

HTTP 错误码 含义 重试
401 invalid_api_key API key 无效或已撤销
403 model_not_allowed workspace 未获得模型授权
429 api_key_rpm_limit_exceeded API key RPM 达到上限 Retry-After
429 streaming_concurrency_limit_exceeded streaming 并发达到上限 Retry-After
402 insufficient_available_balance 人民币预付余额不足 入账后
503 no_available_provider_route 没有可用且已准入的模型入口
503 platform_overloaded 平台保护触发

供应商限流、客户限额和平台过载不会使用同一个错误码,便于客户端采取不同策略。