Short answer: In Cursor, paste a gateway key into the OpenAI API Key field (not the Anthropic one), turn on Override OpenAI Base URL, set it to the gateway's /v1 URL, and add the Claude model under a name that does not start with claude-. Cursor reserves those names for its own backend, so a plain claude-sonnet-5.5 never reaches your endpoint. APIClaw, which I build, works this way with base URL https://apiclaw.biz/v1 and prefixed IDs such as apiclaw/claude-sonnet-5.5. It costs $19 to $129 a month for a daily request quota (500 to 8,000 requests a day, reset at 00:00 UTC) with no per-token metering. It fits Cursor users who chat with Claude for hours every day and want a fixed bill. If you only ask Claude a few questions a week, Cursor's own third-party models at list price or an Anthropic key will cost less.
Disclosure: I build APIClaw. This article was written with AI assistance and checked by me. Prices and Cursor behaviour were checked on the vendors' live pages on 26 Oct 2026.
The settings, step by step
- Open Cursor Settings (
Cmd+Shift+Jon macOS,Ctrl+Shift+Jelsewhere) and go to Models. - Paste your gateway key into OpenAI API Key and save. Cursor's Anthropic and Google key fields have no base URL override, so a gateway key pasted there goes straight to Anthropic or Google and gets rejected.
- Turn on Override OpenAI Base URL and enter the base URL ending in
/v1, with nothing after it:https://apiclaw.biz/v1. - Click Add Custom Model and type the exact ID, for example
apiclaw/claude-sonnet-5.5. Add one line per model you want, such asapiclaw/claude-opus-5.5,apiclaw/gpt-6-solorapiclaw/deepseek-v4-pro. - Disable the built-in models in the list and turn Auto off. While the override is on, Cursor sends its built-in OpenAI-format models to your URL as well, and a leftover built-in can quietly win the model picker.
- Click Verify, pick your model in chat, and send a test message.
If chat works but agent mode fails, that's usually the request shape: Cursor's agent can send a Responses-style body to the chat completions path, which many gateways reject. APIClaw serves a second endpoint for this, https://apiclaw.biz/cursor, which accepts both shapes. Swap the base URL to it and leave everything else alone. If you instead see connection errors right after saving, try Cursor's HTTP compatibility setting (HTTP/1.1); several gateway vendors list that as the most common fix.
Why Claude model names skip your endpoint
This is the part most guides leave out. Cursor matches on the model name, not on the URL you configured. Any custom model called claude-... is treated as Cursor's own Claude and handled on Cursor's backend. Nothing errors. You get a normal reply, billed to your Cursor usage instead of your gateway, and your gateway's logs show zero requests.
Every gateway works around this with a prefix or alias. Router documents a ramp- alias, SuperbAPI an sb- alias, and on APIClaw every model already has an apiclaw/ ID that bills and behaves the same as the bare one. The rule is simple: whatever the vendor, the name you add in Cursor must not begin with claude-, and it must match an ID your key can list.
You can check that before touching Cursor. This lists the IDs your key can use and flags any that would collide:
export GATEWAY_KEY="your-key" curl -s https://apiclaw.biz/v1/models \ -H "Authorization: Bearer $GATEWAY_KEY" \ | python3 -c ' import json, sys for m in json.load(sys.stdin)["data"]: mid = m["id"] note = " <- Cursor will intercept this name" if mid.startswith("claude-") else "" print(mid + note)'
Then confirm the exact name you'll type into Cursor works from outside the editor:
curl -s https://apiclaw.biz/v1/chat/completions \ -H "Authorization: Bearer $GATEWAY_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "apiclaw/claude-sonnet-5.5", "messages": [{"role": "user", "content": "Reply with the word ok."}], "max_tokens": 5}'
The real proof comes after one message in Cursor: the request should appear in your gateway's request log or usage counter. If the editor answered and the counter didn't move, Cursor served that request itself.
What the override never covers
Be honest with yourself about this before you pay for anything:
- Tab completion, Apply and inline edit stay on Cursor's backend whatever you configure. Cursor's own help page says custom keys only work with chat models.
- Composer models refuse a custom key. Agent and Edit modes may also be gated by Cursor.
- Your prompts still pass through Cursor's servers. Cursor routes every own-key request through its backend for prompt building, and its zero-data-retention policy doesn't apply to own-key requests.
- Teams and Enterprise pay Cursor's token rate on top. Cursor charges $0.25 per million tokens on eligible own-key requests on those plans. On individual plans, own-key requests don't draw from your included usage.
- You still need a paid Cursor plan for third-party and own-key use; Cursor's pricing page lists Premium from $30 a month.
So the override replaces what you pay for Claude in chat and agent conversations. It doesn't replace your Cursor subscription.
What each way of getting Claude into Cursor costs
Prices checked Oct 2026 on each vendor's live pricing page.
| Option | Price | How it bills | Claude name trick needed? |
|---|---|---|---|
| Cursor's built-in third-party models | Cursor plan from $30/mo, plus usage | Anthropic list price, billed by Cursor | No |
| Anthropic key in Cursor's Anthropic field | Sonnet 5.5 $2 in / $10 out, Opus 5.5 $4 / $20 per 1M tokens | Per token, billed by Anthropic | No |
| OpenRouter via the override | Model list price plus a 5.5% fee on credit purchases | Per token, prepaid credits | Check the ID doesn't start with claude- |
| SuperbAPI via the override | Model's own per-token rate, no subscription | Per token, prepaid credit | Yes, sb- alias |
| Standard Compute | $19, $39, $89 or $249 a month | Monthly compute budget ($20 to $269); requests stop when it runs out | Check the ID doesn't start with claude- |
| APIClaw | $19 to $129 a month; free 50-request trial, no card | Daily request quota (500 to 8,000/day), no per-token metering | Yes, apiclaw/ IDs |
The two billing styles reward different habits. Per-token options charge more as your chats get longer, and Cursor conversations get long fast, because every follow-up resends the whole thread plus attached files. A request quota charges the same for a 2,000-token question and a 90,000-token one, but caps how many you send per day. If you open lots of short chats, per-token is often cheaper. If you keep long, file-heavy threads going all day, a quota is easier on the bill. For more working configs across tools, I keep setup examples on GitHub.
When APIClaw isn't the right choice
- You mostly want better Tab completion. No endpoint changes Tab; only Cursor's own plan tiers do.
- You use Composer models. They don't accept a custom key at all.
- Your usage is light. A few Claude chats a week costs a few dollars per token; a monthly plan won't pay off.
- You need Cursor's zero-data-retention guarantee. Own-key requests fall outside it, whichever gateway you pick.
- You need card billing today. Payment is crypto on the site, with other methods via support.
FAQ
Why does Cursor ignore my API key when I pick a Claude model?
Because the model name starts with claude-. Cursor routes those names to its own backend regardless of the base URL. Add the model under a prefixed or aliased ID instead.
Can I put a gateway key in Cursor's Anthropic API key field? No. That field talks to Anthropic directly and has no base URL override, so a gateway key is rejected there. Use the OpenAI field with the override.
Does Override OpenAI Base URL work on Cursor's free plan? Cursor documents own-key use for its paid plans, and third-party models are listed from Premium ($30/mo). Plan on a paid plan.
Why does Cursor say "This model does not support custom API keys"? The name collides with one of Cursor's built-in models, or Auto is still on. Use the gateway's prefixed ID, turn Auto off, disable built-ins, and select the custom model by hand.
Does Cursor's Tab completion use my custom API key? No. Tab always runs on Cursor's own models.
Which models can I use in Cursor through APIClaw?
Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, Mistral, Llama and more, all on one key at https://apiclaw.biz/v1.