Cursor, Claude Code and other tools
Most AI-enabled editors, agents and chat front-ends let you bring your own provider. Because Claud serves both the OpenAI Chat Completions format and the Anthropic Messages format with standard sk- keys, they work with Claud without plugins or proxies. This page collects the exact settings for the most common tools.
Everything below needs the same three values:
| Value | OpenAI-format tools | Anthropic-format tools |
|---|---|---|
| Base URL | https://api.claudkey.com/v1 | https://api.claudkey.com |
| API key | sk-... from API keys | same key |
| Model | A slug from Models, e.g. claud-5.1 | same slugs |
If the setting is called "OpenAI API key" or "OpenAI-compatible", use the first column. If it is called "Anthropic API key" or asks for an ANTHROPIC_BASE_URL, use the second. Some tools offer both; either works and is billed identically.
Cursor#
Cursor lets you route its chat and inline-edit requests to any OpenAI-compatible endpoint.
- Open Cursor Settings → Models.
- Under OpenAI API Key, paste your Claud
sk-...key. - Expand the section, enable Override OpenAI Base URL, and enter
https://api.claudkey.com/v1. - Click Verify. Cursor sends a small test request; it should succeed and the key turns green.
- Under the model list, click + Add model and enter the Claud slug(s) you want to use, such as
claud-5.1,claud-opusandclaud-flash. Tick them and untick the built-in models you do not want to see. - Select a Claud model from the picker in Chat or Cmd/Ctrl-K.
Requests are sent from Cursor's servers, so the base URL must be publicly reachable; a local proxy will not work. Some Cursor features (for example Tab completions) only run on Cursor's own models regardless of provider settings.
Base URL : https://api.claudkey.com/v1
API key : sk-...
Models : claud-5.1, claud-opus, claud-flashClaude Code#
Claude Code reads its endpoint from environment variables. Set them in your shell profile (or a project .env that your shell loads) and launch as normal:
export ANTHROPIC_BASE_URL="https://api.claudkey.com"
export ANTHROPIC_AUTH_TOKEN="sk-..." # sent as Authorization: Bearer
export ANTHROPIC_MODEL="claud-opus" # main model
export ANTHROPIC_SMALL_FAST_MODEL="claud-flash" # background / quick tasks
claudeANTHROPIC_API_KEY (sent as x-api-key) works too; use one or the other. You can also pin these in ~/.claude/settings.json under "env" so they apply to every session. Inside Claude Code, /model lets you switch between any Claud slug.
Cline and Roo Code#
Both extensions support an OpenAI Compatible provider and an Anthropic provider with a custom base URL.
- Provider: OpenAI Compatible
- Base URL:
https://api.claudkey.com/v1 - API key:
sk-... - Model ID:
claud-5.1(or any Claud slug)
Enable Supports images for vision-capable models and leave Supports computer use off.
Continue#
Add Claud to ~/.continue/config.yaml:
models:
- name: Claud 5.1
provider: openai
model: claud-5.1
apiBase: https://api.claudkey.com/v1
apiKey: sk-...
roles: [chat, edit, apply]
- name: Claud Flash
provider: openai
model: claud-flash
apiBase: https://api.claudkey.com/v1
apiKey: sk-...
roles: [autocomplete]Aider#
export OPENAI_API_BASE=https://api.claudkey.com/v1
export OPENAI_API_KEY=sk-...
aider --model openai/claud-5.1Zed#
In ~/.config/zed/settings.json:
{
"language_models": {
"openai": {
"api_url": "https://api.claudkey.com/v1",
"available_models": [
{ "name": "claud-5.1", "display_name": "Claud 5.1", "max_tokens": 128000 }
]
}
}
}Then set the OpenAI API key in the assistant panel to your sk-... key.
Open WebUI, LibreChat and other chat front-ends#
Add a new OpenAI API connection:
- URL:
https://api.claudkey.com/v1 - Key:
sk-...
The front-end will call GET /v1/models and list every Claud model your plan allows. Nothing else needs configuring.
LiteLLM and other proxies#
If you fan out across providers with LiteLLM, add Claud as an OpenAI-compatible backend:
model_list:
- model_name: claud-5.1
litellm_params:
model: openai/claud-5.1
api_base: https://api.claudkey.com/v1
api_key: os.environ/CLAUD_API_KEYTroubleshooting#
| Symptom | Cause | Fix |
|---|---|---|
401 invalid_api_key | Key pasted with whitespace, or a revoked key | Re-copy the key; check its status under API keys |
404 model_not_found | Tool is sending a model name Claud does not know | Use a Claud slug from GET /v1/models; do not prefix it with a vendor name |
403 model_not_in_plan | Model is not included in your plan | Upgrade, or pick a model your plan allows |
402 insufficient_balance | Wallet is empty | Top up under Billing; no KYC or card required |
| Tool says "verification failed" | Base URL has a trailing slash or is missing /v1 (OpenAI format) | Use exactly https://api.claudkey.com/v1 |
| Streaming stops early | Tool timeout shorter than the response | Raise the tool's timeout or lower max_tokens |
Still stuck? Open a ticket from the Support page with the x-request-id header of a failing request and we will trace it.