quota_exhausted
The message text is shown in the example below.
| HTTP status | 402 |
type | insufficient_quota |
| Retry? | No, not unchanged |
| Status | In the public catalog (error-envelope.ts) |
| Extra fields | limit, resets_at, upgrade_url, add_credit_url |
When it happens
The plan allowance and usage credits cannot pay for the request. The limit field says which cap stopped it: monthly, weekly, session, spend_limit or no_credits.
Example
{
"error": {
"type": "insufficient_quota",
"code": "quota_exhausted",
"message": "Your plan usage and usage-credit balance are exhausted.",
"param": null,
"request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d",
"limit": "monthly",
"resets_at": "2026-11-01T00:00:00.000Z",
"upgrade_url": "https://syntic.ai/pricing",
"add_credit_url": "https://syntic.ai/agents/billing#api-topup"
}
}How to fix it
- Read
limitfirst:sessionandweeklyclear on their own atresets_at;spend_limitneeds an admin to raise the limit;no_creditsneeds a top-up. - Turn on usage credits so work continues past the plan allowance.
- Do not retry in a loop; the answer will not change until the cap clears.
Detect it in code
err = resp.json().get("error", {})
if resp.status_code == 402 and err.get("code") == "quota_exhausted":
log.warning("%s (%s)", err["message"], err["request_id"]) # fix the request; do not retry unchangedRelated
Was this page helpful?