Errors
Every status code and error body this gateway and its management API return.
Where an upstream provider produced the error, the body is the provider's own. The errors below are the ones this gateway generates itself.
Gateway
Returned on a platform prefix (/openai/…, /anthropic/…, …). Every body is
{ "error": "<message>" }.
| Status | error | Cause |
|---|---|---|
401 | missing bearer token | The request carried no safe-key |
401 | invalid key | The safe-key does not exist |
403 | key revoked | The key was revoked |
403 | key paused | The key is paused |
403 | this route serves <platform> keys, but the key belongs to <platform> | The key was sent to another platform's prefix |
403 | pv quota fused | The key's daily PV quota is exhausted |
429 | uv quota exceeded | The key's distinct-visitor allowance is spent |
429 | per-visitor quota exceeded | One visitor used up their own calls for the day |
502 | missing upstream key | A safe-key whose stored upstream key cannot be decrypted |
502 | unsupported provider | No gateway adapter for the key's platform |
A mock key can additionally return the simulated errors of its platform — see Mock behaviour.
Management API
Under /api/…, authenticated with a session cookie. Bodies are
{ "error": "<message>" }.
| Status | Cause |
|---|---|
400 | A malformed body or an invalid field, e.g. name is required, mode must be 'safe' or 'mock' |
401 | Unauthorized — no valid session |
402 | A plan entitlement would be exceeded: the key limit, the PV budget, or an alert address on a plan that has none (FREE) |
403 | Forbidden — an operator-only route without the admin role |
404 | Unknown key, coupon or subscription |
409 | Coupon code already exists |
413 | A mock fixture larger than the 10 MB limit |
500 | A stored secret could not be decrypted |