Cursor + Claude API Proxy
Cursor's $20 / $40 plan is great until you start using Sonnet for everything and burn through your monthly request quota in two weeks. The fix: bring your own Claude API key via a pay-as-you-go proxy. Cursor adds an OpenAI-style Base URL field exactly for this. Setup time: 2 minutes.
The two fields: Override OpenAI Base URL =
https://tokenprovider.store/v1, paste your proxy key in the OpenAI key
slot, and Cursor will route both ChatGPT and Claude requests through it (proxy speaks
both protocols on the same key).
Two integration paths
Cursor exposes two ways to bring your own model:
- OpenAI key + base URL — easiest. Works for any OpenAI-compatible endpoint, including a proxy that forwards to Claude/Gemini under the hood by model name.
- Anthropic key — direct Anthropic-protocol field. Cursor sends
raw
messagesrequests, no OpenAI translation.
Path 1 is simpler and unlocks ChatGPT + Claude + Gemini in one slot. Path 2 gives a native Anthropic experience but only for Claude models.
Path 1: OpenAI-compatible base URL (recommended)
-
Open Cursor settings
Cmd + , (macOS) or Ctrl + , (Windows/Linux) → Models tab.
-
Tick "OpenAI API Key"
Paste your TokenProvider key in the OpenAI key field (yes, the OpenAI field — the proxy accepts an OpenAI-shaped key here).
-
Click "Override OpenAI Base URL"
Enter:
https://tokenprovider.store/v1
Click Verify — should show a green check.Include the
/v1suffix here (Cursor expects it). For Claude Code or the Anthropic SDK base URL you'd omit /v1 — different conventions. -
Add the Claude models you want to use
Cursor → Models tab → "Add custom model". Add e.g.:
claude-sonnet-4-20250514claude-opus-4-20250514claude-haiku-4-20250514gpt-4o
Cursor sends each model name as-is to the proxy, which routes to the right vendor.
-
Test in chat
Open Composer (Cmd + I), select Sonnet 4 from the model picker, ask "describe this file." A normal response = it's routing correctly.
Path 2: Native Anthropic key
If you prefer a direct Anthropic-protocol path:
- Cursor settings → Models → tick Anthropic API Key.
- Paste your proxy key.
- Cursor unfortunately doesn't expose a base URL override for the Anthropic field in all builds. If yours doesn't, use Path 1 — same outcome.
What you'll see in the dashboard
Every Cursor request shows up in the TokenProvider Usage page with the model used, tokens billed, and a request ID. Patterns to watch:
- Tab autocomplete = many tiny requests — these add up over a day. Switch autocomplete to Cursor's built-in fast model if you want to save here.
- Composer = bigger, less frequent requests — main cost driver.
- Apply diff = a second model call — included in token spend; budget for it.
Common errors
| Error | Cause | Fix |
|---|---|---|
| "Verify" fails | Wrong base URL or missing /v1 | Use exactly https://tokenprovider.store/v1 |
| "Model not found" | Custom model name typo | Use full versioned name like claude-sonnet-4-20250514 |
| 401 | Wrong key | Regenerate from the Keys page |
| 429 | Hard rate-limit on free Cursor tier | Switch to a Pro Cursor plan + still use your proxy key |
FAQ
Does this still let me use Cursor Pro?
Yes. Cursor Pro and bring-your-own-key are independent — Pro covers the in-IDE features, the key controls which API the model calls hit. Many devs run Cursor Pro ($20/mo) + proxy key (pay-as-you-go) and still pay less than Cursor's $40 tier.
Will Cursor's "fast apply" still work?
Yes — fast apply uses the same configured model. You'll see two requests per edit (one for the change, one for apply).
Can I split usage across teammates?
Create one proxy key per developer, watch per-key usage in the dashboard, and you have transparent per-person billing without managing Cursor team seats.
Latency hit?
+20–80 ms over direct API. TTFT for code completions is dominated by the model itself, not the proxy hop.
Cursor + cheap Claude — same workflow, lower bill
$1 minimum top-up, pay per token, cancel anytime.
Sign up free → Already a member