#44 most commonenv/configLovableBolt.newCursorReplitv0Windsurf

OpenAI / AI API: Incorrect API key (401) or quota exceeded (429)

401 Incorrect API key provided / 429 You exceeded your current quota, please check your plan and billing details / insufficient_quota / rate_limit_exceeded

Got a slightly different error? Paste the exact message and get a fix prompt tailored to it.

Paste your error →

What it means

The AI service your app calls either doesn't recognize your key, or your account has run out of credit or is sending too many requests too fast.

How to fix it: paste this prompt into your AI builder

Fix prompt for Lovable, Bolt, Cursor, Replit, v0, Windsurf
My app's AI API calls fail with 401/429. Check the key is read from a server-side env variable (never in frontend code), the variable name matches, and the request goes through a server route or edge function. Add graceful handling for 429 (retry with backoff, friendly message) and 401 (clear error). Don't change prompts or unrelated features.

If the AI can't fix it: manual steps

  1. Check billing/credits in the AI provider's dashboard.
  2. If your key was ever in frontend code or a public repo, revoke it and create a new one.

Where this happens

Seen in these AI app builders and editors:

LovableBolt.newCursorReplitv0Windsurf

Sources

Related env/config errors

Still stuck? Paste your full error and UnstuckMyVibe will match it and hand you the exact fix prompt.

Fix my error →