You called the OpenAI API from your app and got this:
429 You exceeded your current quota, please check your plan and billing details.
Two different things share the 429 status. Fixing the wrong one wastes hours. This guide is for AI-built apps on proofforge.live's radar: the apps where the fix people reach for first is also the unsafe one.
First, read the error code
-
insufficient_quota: your account has no credit or hit its monthly cap. Retrying never helps. Add credit or raise the limit in your billing settings. -
rate_limit_exceeded: you sent too many requests or tokens per minute. Retrying with a delay does help.
The message text is similar. The code field in the JSON body is what tells them apart.
6 causes of quota and rate errors
- No credit on the account. Prepaid billing runs out quietly. Check the billing page first.
- A monthly spend cap you set and forgot.
- A loop that calls the API on every render or keystroke. One bad React effect can burn a day of budget in minutes.
- No retry backoff. A burst of parallel calls trips the per-minute limit. Retry with exponential backoff and a little jitter.
- The wrong key. A key from a different project or org has its own limits. Confirm the key in your env matches the project you funded.
- Someone else is using your key. This is the one to rule out. If the key is in your frontend bundle, in
NEXT_PUBLIC_orVITE_variables, or in a public repo, strangers can spend your quota. A sudden 429 with no change in your own traffic is a warning sign.
The unsafe fix
When the quota error blocks a demo, the fast move is to paste a new key into client code, or to call OpenAI straight from the browser so it "just works". Anything shipped to the browser is readable by every visitor. Open DevTools, Network tab, and look at what your page sends. If your key is in a header or the JS bundle, rotate it now.
The safe fix
- Keep the key server-side only: an API route, an edge function, or a Supabase Edge Function secret.
- Have the browser call your route, not OpenAI.
- Require a signed-in user on that route and add a per-user limit, so one account cannot drain your budget.
- Set a hard monthly limit in OpenAI billing as a backstop.
- Add backoff for
rate_limit_exceeded, and show a clear message forinsufficient_quota.
Check the outside view
You can look at your live site from the outside to see whether a key-shaped string is served to visitors. ProofForge runs a free public-side scan of AI-built apps at proofforge.live. It never signs in, so it sees what any visitor sees. It cannot see your server code or your billing settings, so treat it as one check, not the whole answer.
Related: if a key already leaked and OpenAI disabled it, see our guide on what to do in order.
