Errors are JSON in the OpenAI shape, with the HTTP status as code and a resolution that says what to do next: {"error": {"message": "...", "type": "...", "code": 401, "resolution": "...", "docs": "/docs/errors"}}. This holds for every /v1 and /api address, including unknown ones.
| Status | Type | What to do |
|---|---|---|
| 400 | invalid_request_error | Fix the request: valid JSON, with model and messages. |
| 400 | unsupported_endpoint | Use /v1/chat/completions for this model. |
| 401 | authentication_error | The key is missing, wrong or revoked. |
| 402 | insufficient_credit | Add credit in Credits, or use a free model. |
| 403 | permission_error | The key is locked to another model. |
| 403 | model_not_available | Listed, but not open on the API (Wisps and Playground only). |
| 403 | key_expired | The key reached its end date or limit. Make a new one. |
| 404 | model_not_found | Check the id on Models. |
| 404 | not_found_error | No endpoint at that address. See the OpenAPI spec. |
| 405 | method_not_allowed | Use a method from the Allow header. |
| 429 | rate_limit_exceeded | Slow down and retry after the retry-after seconds. |
| 429 | free_allowance_exhausted | The free allowance is used up for now; it counts the last 7 days, so more frees up as older use ages out. |
| 500 | server_error | Something failed on SaaufAI's side. Retry with backoff; tell Support if it keeps happening. |
| 502, 503 | upstream_error, model_unavailable | The provider had a problem. Retry with backoff, or try another model. |
Limits
- Spending: paid requests draw on your prepaid credit; a key's spending cap stops it at that total.
- Free allowance: an allowance of GLM 4.5 Flash (much bigger on Extended), counted over the last 7 days, in Wisps and the Playground. It isn't available on the API.
- Context and output: each model's maximum is on its page.