Skip to content

One API Key for All Models: Cursor, Cline and Cherry Studio Setup

Key takeaways

  • A key is bound to one group, and a group is one protocol's worth of models under one rate. Every model in that group answers to the same key — that is the practical meaning of one API key for all models.
  • Working across two protocol families means two keys against one host. The host stays single; the key is the part that is scoped.
  • Cursor, Cline, Cherry Studio and Claude Code all ask for the same two values: a base URL and a key. What differs is where each client keeps them, and which path prefix it expects.
  • How to check: before configuring any client, ask the key what it can reach. One call to /v1/models returns the model list the gateway will enforce for that key — and it is the same list the client's Model field has to match.

What the phrase promises, and what it does not

People arrive at this setup after reading "one key, every model" somewhere, then find that their key refuses something they expected to work. The confusion is almost never about the key. It is about groups.

A key is issued against a group. The group decides two things: which models exist, and what a token costs inside it. Every model in that group is reachable with that one key, from any client, on any device — that half of the promise holds. What a single key does not do is span protocol families, because the OpenAI-compatible side and the Anthropic-compatible side are separate groups. A workflow that needs both holds two keys.

Both of those keys are used against the same host, in the same account, drawing on the same balance and writing into the same usage records. Nothing else about the setup doubles.

The two protocol families decide more than the key does

A client can only talk to a group that speaks its protocol. This is the single fact that resolves most "it works in one tool and not another" reports.

What you are wiringProtocol it speaksThe value that changes
Claude CodeAnthropicthe base URL its Anthropic calls go to
Cline, provider "Anthropic"Anthropicthe same value, through the custom base URL option
Cline, provider "OpenAI Compatible"OpenAIbase URL plus a model ID
Cursor, with your own keyOpenAIthe overridden OpenAI base URL
Cherry Studiowhichever provider type you selecthost and key

The path prefixes follow from the protocol. OpenAI-family clients take a base URL that already ends in /v1; Anthropic-family clients take the host and append the path themselves. Pasting the wrong shape produces a 404 that looks like a bad key, which is why it is worth pasting first and reading the error second.

Before you configure anything, ask the key what it can reach

bash
curl https://kuaiapi.net/v1/models \
  -H "Authorization: Bearer sk-your-key"

The response is the model list for that key's group — the same list the gateway enforces on every call. Read two things from it: whether the model you plan to use appears, and whether you got JSON rather than an error body. Keep the output. The id values in it are exactly what a client's Model field wants later; a name copied from another platform's documentation will usually fail.

How to check: send one call with a model name you know is wrong. You should get a model-not-found error — and since failed requests are not billed, that test costs nothing. If a failed call instead turns up as a deduction in your usage records, stop and reconcile before you commit anything larger.

Cline

Cline gives you two doors, and which one you use follows from your group's protocol.

  • OpenAI Compatible — set Provider to "OpenAI Compatible", then fill Base URL, API Key and the Model ID, and use the Verify button to confirm the connection. This is the door for OpenAI-protocol groups.
  • Anthropic — paste the key, then tick the option to use a custom base URL and enter the host. This is the door for Anthropic-protocol groups.

The usual mistake is picking the provider by the model name rather than by the protocol: a Claude model in an OpenAI-protocol group belongs behind the OpenAI Compatible door, not the Anthropic one.

Cursor

In Cursor, open Settings, go to Models, paste the key into the OpenAI API Key field, then enable Override OpenAI Base URL and point it at your endpoint.

Two limitations are worth knowing before you switch it on, because they are properties of the override rather than of any particular endpoint:

  • While the override is active, Cursor's own non-OpenAI models stop being available, so the model picker is driven by your endpoint's model IDs.
  • Tab completion is not covered by the override and continues to use Cursor's built-in models.

If your team relies on Cursor's built-in models, decide which mode you want to work in rather than flipping the override on and off mid-session.

Cherry Studio

Cherry Studio's model services page lets you add an entry and choose its type. The type is the protocol decision: pick the one matching your group, paste the host and the key, then add the model IDs from the list you fetched earlier. Because the model list is entered per provider rather than discovered automatically, an ID that is not in your group's list will simply fail at call time.

Claude Code

Claude Code is the Anthropic-protocol case, and it reads its endpoint and key from environment variables or a settings file rather than from a settings dialog. The settings reference in Anthropic's documentation lists the full set, including ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, plus how settings files and profiles take precedence over each other. Point the base URL at the host and use a key from an Anthropic-protocol group.

FAQ

Can one API key be used for multiple projects? Yes, within its group. The same key can sit in your editor, your terminal and a CI job — nothing ties a key to a device. The reason to split anyway is blast radius: separate keys per project let you revoke one without touching the rest, and keep usage attributable when you read the records later.

Can I use all AI models in one place? One place, yes: one host, one account, one balance and one set of usage records. One key, only within a group. Most people end up running two or three keys side by side against the same host, and that is the intended shape rather than a workaround.

Which models can my key actually call? The ones that appear in the /v1/models response for that key. The gateway enforces the same list at call time, so a model that is absent there fails no matter what you type into a client.

Do I need a different SDK? No, as long as the client already speaks your group's protocol. Two values change; the library, your prompts and your tooling stay as they are. If the client speaks the other protocol, the fix is a key in the matching group, not a compatibility layer.

Next step

Two public pages settle most of the remaining questions before you commit a workflow: the model plaza publishes per-model rates and group multipliers without a login, and the status page shows how each group is running right now, including when it is not running well.

If you are wiring Claude Code specifically, Claude Code base_url: What Changes When You Point It Elsewhere walks through the settings precedence in order. For the operator-level questions — failed requests, refunds, per-request records — Is a Cheap Claude API Reseller Safe? 5 Things to Check takes them one at a time. The English docs cover endpoint and credential setup, and the refund page states the process and its turnaround in writing.

Ready to start calling?

Create an account, generate a key and make your first multi-model call in five minutes. One key for GPT, Claude, Gemini, Grok, DeepSeek and Chinese models.

Sign up freeSee models & pricing