Fix guides · Cursor, OpenAI ·
Fix Cursor OpenAI rate limit exceeded
Rate limit exceeded for your OpenAI key.
Cursor rejects requests when your OpenAI API key hits its rate limit. The limit comes from your OpenAI organization's usage tier — check the 429 response headers and your OpenAI platform dashboard to confirm which limit was hit (requests-per-minute or tokens-per-minute).
Common causes – and how to tell which one you have
1. OpenAI usage tier rate limit reached
How to tell: Cursor shows a rate limit error and the API returns HTTP 429. The x-ratelimit-remaining-requests or x-ratelimit-remaining-tokens headers show zero. The response body names the model, organization, and limit type (e.g. 'on tokens per min (TPM): Limit X, Used Y, Requested Z'). If the error code is 'insufficient_quota', the account has no credit or billing is missing — check OpenAI billing balance; waiting won't help.
Fix: Wait for the rate window to reset. Check your OpenAI dashboard -> Settings -> Organization -> Limits to confirm your tier's caps. Use shorter prompts or fewer tokens per request if you consistently hit limits.
2. Invalid or stale API key
How to tell: Cursor shows an authentication error (HTTP 401) rather than a rate limit. The key may be deleted, revoked, or belong to a different organization than Cursor expects.
Fix: Open Cursor Settings -> Models and update the OpenAI API key to a valid one from your OpenAI dashboard.
How to fix it
- In Cursor, reproduce the error and note the error message. To see the exact HTTP status code and x-ratelimit-remaining headers, call the OpenAI API directly with the same key (e.g., via curl). If the response is HTTP 401, the key is invalid or revoked — update the key in Cursor instead of waiting. If the response is HTTP 429 with error code 'insufficient_quota', check your OpenAI billing balance. If the response is HTTP 429 with x-ratelimit-remaining-requests and x-ratelimit-remaining-tokens at zero, you hit the tier limit.
- Open the OpenAI platform dashboard -> Settings -> Organization -> Limits (https://platform.openai.com/settings/organization/limits) to confirm your organization's current tier and its requests-per-minute and tokens-per-minute caps. Note: limits can also be checked per project.
- Wait for the rate window to reset. Per-minute limits reset within approximately one minute. To confirm the reset, send a new API request and check the x-ratelimit-remaining-requests and x-ratelimit-remaining-tokens headers on its response. If the limit hit was tokens-per-minute, watch x-ratelimit-remaining-tokens.
- In Cursor Settings -> Models, confirm which API key is active for the model you are using. If you see HTTP 401, update the key to a valid one from your OpenAI dashboard.
- If you consistently hit limits, use shorter prompts or fewer tokens per request, or contact OpenAI via the Limits page in the dashboard to request a higher usage tier.
Using Lovable, Bolt or v0?
In Cursor: 'My requests fail with rate limit exceeded'. Check Cursor Settings -> Models for the active OpenAI key. Call the OpenAI API directly with that key (e.g., via curl) to capture status code and x-ratelimit headers. SECURITY: Do not paste the key into a shared chat or shell history; use an environment variable. For 401, update the key. For 429 with 'insufficient_quota', check OpenAI billing. For 429 with x-ratelimit headers at zero, check OpenAI platform dashboard -> Settings -> Organization -> Limits for your tier's caps. Do not suggest ChatGPT Plus — it does not change API rate limits.
Using Cursor, Claude Code or Windsurf?
Ask Cursor or Claude Code to open Cursor Settings -> Models and confirm the active OpenAI key. Have them call the OpenAI API directly with that key (e.g., via curl) to capture the full response (status, body, x-ratelimit headers). SECURITY: Warn them not to paste the key into chat or shell history; use an environment variable. Then check the OpenAI platform dashboard -> Settings -> Organization -> Limits to confirm the current tier. Do not suggest ChatGPT Plus — it does not change API rate limits.
The “fix” to avoid
Buying ChatGPT Plus or Pro to fix API rate limits — those are separate consumer products and do not change OpenAI API rate limits. Confusing a 401 (invalid key) with a 429 (rate limit) — they require different fixes. Treating 'insufficient_quota' as a rate limit — it means no credit or billing is missing; waiting won't fix it. Assuming limits differ between personal and organization keys — limits attach to the organization's usage tier and also apply per project.
Copy-paste fix prompt for your AI coding tool
Paste this into Cursor, Claude Code, Lovable or Bolt:
My Cursor requests fail with a rate limit error. First confirm which OpenAI API key Cursor is using (Cursor Settings -> Models). To see the exact HTTP status code and x-ratelimit headers, call the OpenAI API directly with that key (e.g., via curl). SECURITY: Do not paste the key into a shared chat or shell history; use an environment variable or a temporary curl --header with the key. If the status is 401, the key is invalid — update it in Cursor. If the status is 429 with error code 'insufficient_quota', check your OpenAI billing balance. If the status is 429 with x-ratelimit-remaining-requests and x-ratelimit-remaining-tokens at zero, check your OpenAI platform dashboard -> Settings -> Organization -> Limits for your tier's requests-per-minute and tokens-per-minute caps. Wait for the rate window to reset (per-minute: ~1 minute), then send a new request to confirm headers are positive. Use shorter prompts or fewer tokens per request if you consistently hit limits. Do not suggest buying ChatGPT Plus — that is a separate consumer product and does not change API rate limits.
Questions people ask
How do I know which limit was hit?
The 429 response includes x-ratelimit-remaining-requests and x-ratelimit-remaining-tokens headers — whichever is zero indicates the limit. The response body names the model, organization, and limit type. Your OpenAI dashboard -> Settings -> Organization -> Limits lists the tier caps.
Does ChatGPT Plus raise API rate limits?
No. ChatGPT Plus/Pro is a separate consumer subscription. OpenAI API rate limits are based on your organization's API usage tier.
How long do I wait?
Per-minute limits reset within approximately 1 minute. To confirm, send a new API request and check the x-ratelimit-remaining-requests and x-ratelimit-remaining-tokens headers on its response. If the limit was tokens-per-minute, check x-ratelimit-remaining-tokens.