Skip to main content
APITroubleshooting

402 error: insufficient balance or budget

Why AICredits returns 402 insufficient_quota, how to tell a wallet problem from a per-key budget problem, and how to resume.

Use this page with an AI assistant

Opens a new chat with this docs URL and the correct AICredits base URLs.

A 402 response with type: insufficient_quota means one of two things: the wallet balance is too low, or the API key has reached its own budget. The request is rejected before it reaches a model.

Wallet balance too low

The wallet is prepaid and is the overall spending ceiling. When it reaches zero, requests stop. Top up from ₹50 with UPI, net banking or a card in the dashboard under Billing. Credits are available once Razorpay confirms the payment.

Key budget reached

Each key can have its own budget. If the wallet has money but one key returns 402, raise that key's budget or use another key. The error message includes a direct link to top up or to raise the budget.

Prevent it

  • Watch the wallet balance in the dashboard; a low-balance alert appears below ₹10.
  • Give each project its own key with a budget that fits it.

Do not retry

A 402 will not succeed on retry. Fix the balance or the budget first.