Maybe your balance is out?
âUser Provided API Key Rate Limit Exceededâ Again, this is bullshit!
Iâm also having this problem. AFAICT Iâm not exceeding any limit that Claude or OpenAI enforces against my API key. So why is Cursor enforcing a rate limit on API requests that Iâm paying for directly?
And no, itâs not about the balance, because waiting about 60 sec seems to fix the issue, but slows me down â undermining the whole reason Iâm using this API key in the first place rather than waiting for the slow request queue.
I also having this problem, i reached the limit on premium models and try to go back using my Anthropic API Key but âUser API Key Rate limit exceededâ. If i wait some minutes I can have the model running but not a complete answer.
Anybody has answer to this? I have provided TWO APIs one for Open AI and one for Anthropic but still having the same problem. Waiting does not make much of a difference. Yes, I still have balances and I even have auto-recharge turned on so they can just keep charging when my balance drops below a certain $ amount. Any ideas?
Composer should at least have a backoff/retry mechanism.
Any solution yet?.. Facing the same issue. So frustrating! Charge me more money, make it slower if needed, but donât just block the process without even any retry button!
Just be aware that Anthropic are having some teething issues with the increased demand on their models over the last month.
Itâs possible that these limits are being imposed by Anthropic, not by Cursor.
To test this, set up a quick Jupyter notebook to test the Anthropic API, e.g.
# Install the Anthropic SDK
!pip install anthropic
# Import the Anthropic client
import anthropic
# Initialize the Anthropic client with API key
client = anthropic.Anthropic(
api_key="your_api_key_here" # Replace with your actual API key
)
# Send a message to the Claude 3.5 Sonnet model and retrieve a response
message = client.messages.create(
model="claude-3-5-sonnet-20240620", # Specify the Claude 3.5 Sonnet model
max_tokens=1024, # Set the maximum token limit
messages=[
{"role": "user", "content": "Write a short sonnet about the ocean."} # Provide the prompt
]
)
# Print the response from the Claude 3.5 Sonnet model
print(message.content)
I donât believe we enforce any rate limits on using your API key, so these will be limits enforced on the other end (Anthropic or OpenAI).
We have now enabled usage-based pricing for Pro users using premium models, which means if you exceed your 500 fast requests but donât want to buy another 500, you can enable usage pricing.
For Claude 3.5 Sonnet, the cost is $0.04 per request ($20 / 500).
Hi @danperks, I understand there can be limitations from 3rd party providers and/or cursorâs API. It makes sense.
That being said, this keeps interrupting the composer in agent mode. Since I canât precisely track and restart it where it was interrupted, I gave to restart the agent from the beginning of the task, very likely to hit the limit again.
A very light retry mechanism with exponential back off seems to me like a good way to handle this issue with minimal effort. What do you think?
Itâs difficult as what works for Anthropic might be different for OpenAI, and again for any 3rd party APIs that users may use. The best way here would be to use the usage-based pricing feature, and not have to worry about API keys at all!