Cursor Pro includes a monthly allowance of “fast requests” to Claude and other models. Once you hit those limits, you either wait or pay for more. But there’s another option: connect Cursor to your own Anthropic API key and pay per token instead of per subscription tier.
This guide shows you how to set it up and helps you decide if it makes financial sense.
When This Makes Sense
Use your own API key if:
- You’re a heavy Cursor user who regularly hits the monthly request limits
- You want unlimited access without upgrading to a higher Cursor tier
- You want to use specific Claude model versions not available in Cursor’s standard menu
- Your usage is sporadic (pay for what you use vs. monthly subscription)
Don’t bother if:
- Your Cursor Pro usage stays within the included limits
- You’re not comfortable estimating API costs
- You prefer predictable monthly pricing
Step 1: Get an Anthropic API Key
- Go to console.anthropic.com
- Sign in or create an account
- Navigate to API Keys → Create Key
- Give it a name (e.g., “Cursor”) and copy the key
Important: Set a spending limit immediately. In the Anthropic console, go to Billing → Spending Limit and set a monthly cap. Without this, unexpected heavy usage can lead to large unexpected charges.
Step 2: Configure Cursor
- Open Cursor
- Go to Settings (Cmd+, or File → Preferences → Cursor Settings)
- Navigate to Models
- Under OpenAI API Key section, look for the option to add custom API providers (or use the “API Keys” section)
- For Anthropic Claude models, add your API key in the Anthropic section
Alternatively, some Cursor versions expose this via:
- Settings → Features → “Add model”
- Or Settings → API Keys → “Use your own API key”
The exact location varies by Cursor version. Search “API key” in Cursor’s settings search.
Step 3: Select Your Model
Once your API key is connected, you can select specific Claude models in Cursor’s model picker:
claude-3-7-sonnet-20250219— Best for coding (most capable, higher cost)claude-haiku-4-5— Fastest, cheapest (good for autocomplete)claude-opus-4-7— Most capable (reserve for complex tasks)
Pro tip: Configure Cursor to use Haiku for Tab completions and Sonnet for chat. The quality difference for autocomplete is minimal; the cost difference is significant.
Understanding the Costs
API pricing (approximate, check current pricing at anthropic.com):
| Model | Input ($/1M tokens) | Output ($/1M tokens) |
|---|---|---|
| Claude 3.7 Sonnet | $3 | $15 |
| Claude Haiku 4.5 | $0.80 | $4 |
| Claude Opus 4.7 | $15 | $75 |
A typical Cursor session (30 min chat + editing):
- ~10,000 input tokens + ~5,000 output tokens
- With Sonnet: (
$0.03 input) + ($0.075 output) = ~$0.10 per session
Monthly estimate (20 sessions/week = 80 sessions/month):
- With Sonnet: ~$8/mo
- With a mix of Haiku + Sonnet: ~$3-5/mo
Compare to Cursor Pro ($20/mo) — you’ll usually save money with your own API unless you’re an extremely heavy user (200+ sessions/month).
Practical Tips for Cost Management
1. Use Haiku for simple tasks Simple question-answer, boilerplate generation, and autocomplete don’t need Sonnet. Switch to Haiku when you’re not doing complex architectural work.
2. Keep context focused
Larger contexts = more input tokens = higher cost. Use /context management to include only relevant files, not your entire project.
3. Monitor usage in the Anthropic console The Usage dashboard shows you daily and monthly token usage. Check it weekly until you understand your patterns.
4. Set conservative spending limits Start with a $20/month spending limit. Adjust upward only after you understand your usage.
5. Don’t use Opus for everyday tasks Opus is 5x more expensive than Sonnet. Reserve it for genuinely complex reasoning tasks.
Troubleshooting
“API key not valid” error: Make sure you copied the full key including the sk-ant- prefix.
Requests failing after a few seconds: Check your Anthropic account for rate limits. New accounts have lower rate limits that increase with usage history.
Higher-than-expected costs: Check the Anthropic Usage dashboard. Long context conversations (where you’ve loaded many files) are the most common cause of unexpected token usage.
Is It Worth It?
For most Cursor Pro users: probably not necessary. The included fast requests are enough for moderate usage, and the setup friction isn’t worth it.
For heavy users who regularly see “slow request” queuing in Cursor: yes. Your own API key eliminates queuing, and the cost with efficient model selection is typically less than upgrading to a higher Cursor tier.
For developers building on Claude alongside Cursor: yes. Having an API key set up in Cursor is a natural extension of the API access you already have.