I’m using my own Google key and I often run into API rate limit errors despite having enough headroom on my Google account. I have verified this by running direct Gemini calls through a continuous shell command which keeps returning successfully while simultaneously running into this in Cursor. It’s also not a rare occurrence, I’d say it happens roughly 20% of the times.
Steps to Reproduce
Add a Google API key to the Cursor IDE
Use any Gemini model throughout the day
You’ll see the rate limit error roughly 10-20% of the time (depending on time of day)
Expected Behavior
No rate limit errors should occur unless you are actually running into a rate limit at the provider ie. Google in this cae
Operating System
MacOS
Version Information
3.27.22 (Universal)
For AI issues: which model did you use?
All Google models - Gemini flash, Gemini pro & Argon
When you bring your own Google key, Cursor still routes the request through its own servers to build context and the prompt, so a Cursor agent turn and a direct shell call take different paths and send very different amounts of data. An agent turn carries a large prompt (lots of context and tokens), while a quick shell call sends almost nothing. Since Gemini’s limits are largely per-minute token and request limits, the heavier Cursor traffic can hit a per-minute limit on your key even while your lightweight shell loop stays under it. Newer models like Argon can also have tighter limits.
It’s also worth knowing that this error in Cursor can show up both for a real provider rate limit and when Google’s endpoint is briefly overloaded or returning an error, so the “rate limit” wording by itself doesn’t always mean Google actually rate-limited you.
To pin it down, could you share the specific model you had selected when it happened (and confirm it was a pinned Gemini model, not Auto, since Auto doesn’t use your key), and a Request ID from a failing turn if you can grab one. It also helps to check your Google AI Studio / Cloud quota dashboard and request logs around those timestamps to see whether Google logged a 429 on those heavier requests. That tells us quickly whether the limit is coming from Google or whether Cursor is mislabeling a transient error.
Thanks for the quick response, Mohit. It makes sense that Cursor routes the calls internally with wrapper/harness data. The issue happens quite frequently and I’m very thoroughly aware of all limits on Google’s end - RPM, TPM, RPD etc.
The API key I’ve added to Cursor is a Tier 3 API key which we use on our development servers as well and these keys have very high limits and we pretty much run under 20% usage on all metrics so a rate limit on Google’s end makes no sense. I’ve also actively monitored the Google dashboards several times to confirm when Cursor shows this error - a rate limit was never actually hit during these times.
I’m happy to send over the request ID the next time it happens - I don’t have one handy. I ran into this while using Argon yesterday but have seen it many times before with Flash as well. I’ll provide exact details the next time I capture it.
Hi @akai, thanks for the request IDs. I traced all five, and they match what you saw on your Google dashboards.
Each one did get a 429 back from Google on your key, but it’s Google’s generic “Resource has been exhausted” response with no quota named. When a key actually hits its RPM or TPM limit, Google names that limit in the error, and none of yours do. So this isn’t your key’s limits. It looks like short bursts of capacity pressure on Google’s side, mostly on Gemini 4 Argon, and it isn’t specific to your account.
On our side, Cursor labels this as “User API Key Rate limit exceeded”, which is misleading here. I’ve passed that to the team.
Our advice for now:
When it happens, wait a few seconds and resend. These tend to come in short bursts.
For long agent runs, Gemini 3.8 Flash on the same key hits this much less often than Argon.
My name is Xuanming, and I’m reaching out from ChatAndBuild.
We are currently using Cursor with our own custom API keys for both GPT and Gemini models. Everything has been working well overall, except that we frequently encounter rate limit errors when using the Gemini 4 Argon model.
We have already checked our Gemini API usage with the Google team, and they confirmed that we have not exceeded any of our API rate limits. They recommended that we reach out to the Cursor team to investigate further.
Could you please help us understand why these rate limit errors are occurring? Is there any issue or limitation related to our Cursor team plan or the way custom Gemini API keys are handled for the Gemini 4 Argon model?
We would appreciate your help in investigating this issue.
Looking forward to your response.
Best regards,
Xuanming
ChatAndBuild
Steps to Reproduce
Set custom Gemini key on setting.
Open new chat on Cursor.
Keep sending prompt on the chat thread, then you will get rate limit error frequently.
Expected Behavior
Our API key has very high rate limit, so rate limit error shouldn’t occur