Fix a 402 error (quota exhausted)

A 402 with the code quota_exhausted means neither your plan’s token allowance nor your credit can pay for the request. The error’s limit field tells you which limit stopped it, and that decides the fix.

Read the error

{
  "error": {
    "type": "insufficient_quota",
    "code": "quota_exhausted",
    "message": "You've hit your weekly usage limit. It resets at 2026-10-20T00:00:00.000Z. Enable usage credits or upgrade your plan to keep going.",
    "param": null,
    "limit": "weekly",
    "resets_at": "2026-10-20T00:00:00.000Z",
    "request_id": "req_6f1c2a9e0b7d4c3a8e5f1b2d"
  }
}

Fix by limit value

limitWhat happenedWhat to do
sessionThe rolling five-hour window (25% of your monthly allowance) is fullWait until resets_at, or turn on usage credits
weeklyThe weekly window (60% of the monthly allowance) is fullWait until resets_at, or turn on usage credits
monthlyThe whole monthly allowance is usedWait for the new month, turn on usage credits, or upgrade
spend_limitAn organization, member or group spend limit was reachedAn admin raises the limit in Billing → Spend limits, or wait for the new month
no_creditsYour credit balance can’t cover the requestBuy credit on the Recharge page or set up auto-reload

Turn on usage credits

On paid plans, credits let work continue past the plan windows at your plan’s overage rate. They only take over when usage credits are enabled and a card is on file. See How usage limits work.

The Free plan has no overage and can’t use the API at all.

If usage can’t be checked at that moment, you get 503 usage_check_unavailable with a Retry-After header instead of a 402. That one is safe to retry after a few seconds.

Don’t retry in a loop

The answer won’t change until the window reopens or you add credit. Retrying straight away only adds load. Have your code stop and alert you, or wait until resets_at.

To avoid surprises, keep auto-reload on and watch the bars on the Usage Limits page. They turn amber at 80%.

Was this page helpful?