Status Code Mapping

Status Code Mapping

When an upstream model service returns an error, Chuizi.AI maps it into a consistent public error shape. Internal upstream error details are stored server-side for troubleshooting and audit, not exposed directly to clients.

CaseGateway statusMeaning
User key invalid401Your ck- key failed authentication
User balance insufficient402Wallet balance is insufficient
Key policy blocked403Model, IP, or daily cap policy blocked the request
Model unavailable or unpublished404Check available models with GET /v1/models
Too many requests429Key-, user-, or model-level limit reached
Model service auth/config issue502Service configuration or model access issue
Upstream 5xx502/503/504Upstream error, unavailable service, or timeout

Public responses do not expose upstream keys, accounts, regional priority, or full failover chains.

Status Code Mapping — Chuizi AI Docs | Chuizi AI