How do I use Claude in Cursor with a custom API key and base URL?

Last updated by the APIClaw team

In Cursor, open Settings, Models, paste your APIClaw key as the OpenAI API Key, override the base URL with https://apiclaw.biz/v1, and add a custom model such as apiclaw/claude-sonnet-5-5. Turn Auto off. Plans start at $19 a month with no per-token billing.

What the Cursor custom API setup does

Cursor lets you bring your own OpenAI-compatible key and point it at a different base URL. APIClaw is an OpenAI-compatible gateway, so once you fill in those fields, Cursor chat sends its requests to APIClaw and the model you pick answers. Your cost is the flat plan price instead of a per-token charge. A $19 Plus plan gives 500 requests a day, and the highest listed plan, Ultimate Max at $129, gives 8,000.

There are two things to know up front. The setup covers chat and, with the right base URL, agent mode. It does not cover everything Cursor offers, and the section on limits below spells out exactly what stays on Cursor's own side.

Before you start

Create an account at /ui/signup/ and copy an API key from the dashboard. The free trial is 50 requests with no card, which is enough to test the whole setup. Open the model hub to see the model IDs and the weight of each one. In Cursor you always write the ID with an apiclaw/ prefix.

Step by step in Cursor

  1. Open Cursor Settings and go to Models.
  2. Find the OpenAI section, paste your APIClaw key into the OpenAI API Key field and save.
  3. Turn on Override OpenAI Base URL and enter https://apiclaw.biz/v1.
  4. Click Add Custom Model and type a model ID with the prefix, for example apiclaw/claude-sonnet-5-5.
  5. Disable the built-in models in the list so that only your APIClaw model is enabled.
  6. Click Verify. Cursor only checks that the endpoint answers; it does not test every mode.
  7. Turn Auto off, select your APIClaw model in chat and send a test message.
SettingValue
OpenAI API KeyYour APIClaw key
Override OpenAI Base URLhttps://apiclaw.biz/v1
Custom modelapiclaw/claude-sonnet-5-5
AutoOff

While the base URL override is on, Cursor sends its built-in models to that URL as well. That is why step 5 matters: leaving the built-ins enabled makes Cursor try them against APIClaw, where they do not exist.

Why the apiclaw/ prefix is required

Cursor ships models with names of its own, including gpt-6-sol and claude-fable-5-1. A custom model whose name collides with one of them is refused. The prefixed name avoids the collision, and the request still reaches the same model with the same behavior and the same billing. Write apiclaw/claude-opus-5-5, not claude-opus-5-5.

Models and request weights

Model ID in CursorWeightTypical use
apiclaw/claude-sonnet-5-52Everyday coding chat and edits
apiclaw/claude-opus-5-53Harder reasoning and large refactors
apiclaw/claude-fable-5-13Heaviest tasks
apiclaw/gpt-6-sol3GPT-family alternative
apiclaw/deepseek-v4-flash1Quick, light questions
apiclaw/qwen3.8-flash2Fast general model

Weight is the number of requests one call takes from your daily quota. On the $39 Pro plan (1,000 requests a day), that is 500 Claude Sonnet messages a day. On the $69 Ultimate plan (3,000 a day), it is 1,000 Claude Opus messages. Context size does not change the count, so a chat that includes a whole file costs the same as a one-line question. The quota resets at 00:00 UTC, and tokens per request are unlimited. Requests per day are not.

Agent mode needs a different base URL

Cursor's agent sends a Responses-shaped body to the chat completions path, which many gateways reject. APIClaw has a Cursor-specific endpoint that accepts both shapes. If agent mode misbehaves, change the Override OpenAI Base URL to:

text
https://apiclaw.biz/cursor

Everything else stays the same: the same key, the same apiclaw/ model names. Requests are billed and logged exactly as on the normal base URL. The Cursor docs page keeps the current instructions if Cursor changes its settings screen.

What a custom key covers in Cursor

Chat routes to your custom base URL. Tab completion always stays on Cursor's own models, whatever you configure. Agent and Edit are gated by Cursor and may answer that the request cannot be billed to an API key. Composer models refuse a custom key outright. Cursor's zero-data-retention policy does not apply to requests made with your own key, and Teams and Enterprise plans can still charge Cursor's own per-token rate on top of APIClaw. Read your Cursor plan terms before you rely on this for work with strict data rules.

Getting the most from a daily quota

Because weight, not size, decides the cost, a few habits stretch a plan. Use a one-request model such as deepseek-v4-flash for quick questions, renames and boilerplate, and switch to claude-sonnet-5-5 or claude-opus-5-5 when the task needs it. Put the files that matter into one message instead of asking five small follow-ups, since one large request costs the same as one small one. Keep an eye on usage in your dashboard for the first week, then pick the smallest plan that leaves headroom for your busiest day.

You can switch models in Cursor at any time from the model picker. The gateway does not switch for you, so the model you select is the model that answers and the weight you see in the table is the weight that applies.

Cursor plan, per-token API or APIClaw?

Cursor's built-in modelsPer-token API keyAPIClaw
BillingCursor subscription and usageProvider's per-token price, such as Claude Sonnet 5.5 at $2 input and $10 output per million tokensFlat monthly plan
Heavy agent daysCan hit plan usage limitsBill grows with tokensFixed price, daily request quota
Model choiceCursor's listOne provider per keyClaude, GPT, DeepSeek, Qwen, Kimi, GLM and more through one key

Honest caveat: at low volume, per-token billing is often cheaper than $19 a month. If you ask Cursor a few dozen short questions a day, test both. If you run long agent sessions, the flat plan usually wins. The cheap Claude API for Cursor and Claude Code page works through the numbers.

Troubleshooting

Model not found. The model name is missing the apiclaw/ prefix, or it has a typo. Copy the ID from the model hub and add the prefix in Cursor.

This model does not support custom API keys. Cursor blocks its own models from custom keys. Add the model with the prefix, turn Auto off, disable the built-in models and select the APIClaw model explicitly. Composer models cannot be used with a custom key at all.

401 Unauthorized. The key is wrong or has stray spaces. Re-paste it from the dashboard, where your API keys are listed, and save again. Make sure the key went into the OpenAI API Key field, not another provider's field.

404 from the base URL. Use exactly https://apiclaw.biz/v1 for chat, with no /chat/completions added. Agent mode uses https://apiclaw.biz/cursor. Do not use the Claude Code address for Cursor, because that one has no /v1.

429 Too Many Requests. Your daily quota is used up. It resets at 00:00 UTC. Switch to a lighter model such as apiclaw/deepseek-v4-flash, wait for the reset, or move to a larger plan. Opus calls count as 3 requests each, so heavy Opus use drains a plan faster than Sonnet.

The model is not selectable in chat. Auto mode is probably on. Turn it off and pick the custom model manually.

If you also use a terminal agent, Claude Code needs the Anthropic-style address https://apiclaw.biz and is covered in the Claude Code docs. Kilo Code takes the OpenAI-style address and is covered in the Kilo Code docs. For a general view of one key across tools, see one API key for all models.

Payment and independence

APIClaw takes cryptocurrency through NOWPayments and no card is needed. Plans last 30 days and can be cancelled at any time. APIClaw is independent and not affiliated with Anthropic, OpenAI, Google or Cursor. APIClaw routes requests to models available through publicly available sources and provider APIs.

Frequently asked questions

What base URL do I enter in Cursor for APIClaw?

Use https://apiclaw.biz/v1 for chat. If agent mode misbehaves, use https://apiclaw.biz/cursor instead, with the same key and model names.

Cursor docs

Why do I need the apiclaw/ prefix on the model name?

Cursor refuses custom models whose names match its own, such as gpt-6-sol and claude-fable-5-1. Writing apiclaw/claude-sonnet-5-5 avoids the collision and reaches the same model at the same cost.

Does Tab completion use my APIClaw key?

No. Tab completion always stays on Cursor's own models. A custom key applies to chat and, with the Cursor endpoint, agent mode, subject to Cursor's own gating.

How many Claude messages do I get in Cursor per day?

It depends on the plan and model weight. The $19 plan gives 500 requests a day, which is 250 Claude Sonnet calls. The $129 plan gives 8,000 requests, which is 2,666 Claude Opus calls.

Can I test before paying?

Yes. The free trial gives 50 requests with no card at /ui/signup/. Use it to confirm Cursor accepts the key and the model name.

Start the free trial

Ready to get started?

Every new account includes 50 free requests. No card required.

Create your free account