SuperbAPIAll articles

Blog

How to Use Claude Models in Cursor With Your Own API Key

Updated 2026-08-16 · ~4 min read

Cursor reserves every claude-* model name for its own built-in subscription. Point Cursor at a third-party gateway and ask for claude-opus-5 and the request is intercepted before it ever leaves the editor — so the fix is to call the same model under a different name. On SuperbAPI every model also answers to an sb- prefixed alias, for example sb-claude-opus-5, which Cursor treats as a custom model and forwards untouched.

Why does Cursor ignore my API key when I pick a Claude model?

Because the model ID collides with a built-in. Cursor ships Claude access as part of its own plan, and it matches on the model name — not on which endpoint you configured. When the name matches something it already knows, it routes to its own backend and your custom base URL is simply not used. Nothing errors. You get a normal-looking reply, billed to Cursor rather than to your gateway, which is why this is so easy to miss.

The tell is that your gateway shows zero requests while the editor is clearly working. If you are debugging this, check your usage dashboard before you check anything else.

The fix: use the aliased model name

Every model on the gateway is reachable under an sb- prefix. The prefix is stripped before routing, so pricing, context window and behaviour are identical — it exists purely to sidestep name collisions in editors like this one.

Instead ofUse in Cursor
claude-opus-5sb-claude-opus-5
claude-fable-5sb-claude-fable-5
claude-sonnet-5sb-claude-sonnet-5

Model names that do not collide with a Cursor built-in — Gemini and Grok IDs, for instance — work without the prefix. Using the alias anyway does no harm, so if you want one consistent convention, prefix everything.

Step by step

Two prerequisites before you start: this needs Cursor Pro, and the key must go in the OpenAI field — never the Anthropic, Google or Azure key fields, even though you are calling a Claude model. Those fields talk directly to those vendors and will reject a gateway key.

  1. Open Cursor Settings (⌘⇧J) → ModelsAPI Keys.
  2. Paste your gateway key into OpenAI API Key.
  3. Switch Override OpenAI Base URL to ON and set it to https://www.superbapi.com/v1 — it ends at /v1, with nothing after it.
  4. + Add modelsb-claude-opus-5. Add one line per model you want.
  5. Turn off every built-in model in the list. If a built-in stays enabled, Cursor may keep choosing it and you will think the setup failed.
  6. Click Verify. A green result means the request reached the gateway.

If Verify fails, the base URL is the usual culprit — a trailing slash or a missing /v1 accounts for most of it.

The trade-off nobody mentions

Turning Override ON routes the whole OpenAI channel through your gateway, and Cursor's own features that depend on its native models — Auto and Composer — will error while it is on. That is expected, not a misconfiguration. Toggle Override OFF to get them back. If you want both, keep the toggle handy: there is no per-feature setting.

How do I confirm it is actually routing through my key?

Do not trust a working reply; a reply proves only that something answered. Check that your gateway recorded the call:

curl https://www.superbapi.com/v1/key \
  -H "Authorization: Bearer $SUPERBAPI_KEY"

Spend that moves after a Cursor request is the proof. Spend that stays flat means Cursor answered it internally, whatever the editor appeared to do.

Does this work in other editors?

Yes, and most of them are simpler because they do not reserve model names. Cline, Continue, Zed, Aider and anything else accepting a custom OpenAI-compatible base URL will take the plain model ID. Cursor is the notable exception, which is why it needs its own guide. For the wider list see Cursor alternatives for AI coding.

What does it cost?

You pay the model's own per-token rate out of prepaid credit — there is no subscription and no monthly minimum on top. Because it is your key, the same balance also serves your scripts, your CI and any other editor, instead of being locked to one product. A call that fails costs nothing.

Create a key

SuperbAPI is an independent aggregator and is not affiliated with, endorsed by, or partnered with any model owner. Third-party product names are used nominatively to describe compatibility and routing. Comparisons reflect our understanding at publication and may change.