api
Errors
Structured, safe errors with stable status codes.
Last updated 2026-07-10
Shape
error response
{ "error": "this key lacks the 'generate' scope" }Status codes
| Status | Meaning | Retry? |
|---|---|---|
| 400 | Invalid JSON or missing required fields | Fix the request |
| 401 | No session or key, or the key is revoked | Re-authenticate |
| 403 | Key lacks the required scope | Reconnect with the right scopes |
| 404 | Unknown route or resource | Check the path against the discovery doc |
| 422 | Safety policy refused the content, or a publish gate refused | Do not retry unchanged; read the reason |
| 500 | Unexpected server error | Retry once, then report |
| 501 | The capability is honestly not wired yet (for example paid checkout) | See /build for status |
Blocked outcomes
Safety blocks return a structured outcome with a human-readable reason and spend nothing. They are logged; repeated evasion attempts violate the acceptable use policy.