Claude Code and IDE tools
Coding assistants reach Kadraris through one of two compatible endpoints, and switching a tool over is a matter of swapping its base URL and key:
- Claude Code speaks the Anthropic format and uses
/v1/messages. - Cursor, Cline, Continue and nearly everything else speak the OpenAI format and use
/v1/chat/completions.
| Tool | Base URL | Format |
|---|---|---|
| Claude Code, Anthropic SDK | https://kadraris.com | Anthropic |
| Cursor, Cline, Continue, OpenAI SDK | https://kadraris.com/v1 | OpenAI |
Make a dedicated key for coding tools and set a monthly spend limit on it in the dashboard. A long agent session can fire off a lot of requests, and the limit puts a ceiling on what a stuck loop can cost you.
Claude Code
Environment variables on macOS and Linux
export ANTHROPIC_BASE_URL=https://kadraris.com
export ANTHROPIC_AUTH_TOKEN=sk-kd-...
export ANTHROPIC_MODEL=claude-opus-5.5 # not required
claudeTo keep these after you close the terminal, add them to ~/.bashrc or ~/.zshrc.
Environment variables on Windows PowerShell
$env:ANTHROPIC_BASE_URL = "https://kadraris.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-kd-..."
$env:ANTHROPIC_MODEL = "claude-opus-5.5" # not required
claudeThose last only for the current window. To store them for your Windows user:
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://kadraris.com", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-kd-...", "User")Then start a fresh terminal.
Using settings.json instead
Claude Code can also read the same values from its settings file. Use ~/.claude/settings.json to apply them everywhere, or .claude/settings.json in a repository to apply them to that project only:
{
"env": {
"ANTHROPIC_BASE_URL": "https://kadraris.com",
"ANTHROPIC_AUTH_TOKEN": "sk-kd-...",
"ANTHROPIC_MODEL": "claude-opus-5.5"
}
}A project settings file with a key in it should never be committed. Put the key in the user-level file, or in .claude/settings.local.json.
Picking models
| Variable | What it controls |
|---|---|
ANTHROPIC_MODEL | The main model, e.g. claude-opus-5.5 or claude-sonnet-5 |
ANTHROPIC_DEFAULT_HAIKU_MODEL | The model used for small background jobs. Point it at a Claude model from the Kadraris catalog; claude-haiku-4.5 is the lowest-priced option |
A model can also be chosen per session: claude --model claude-sonnet-5. /v1/messages serves Claude models only, namely Claude Opus 5.5 ($3.78 / $18.90 per 1M tokens), Claude Sonnet 5 ($3.24 / $16.20 per 1M tokens) and Claude Fable 5.1 ($9.45 / $47.25 per 1M tokens).
Confirming it works
Type /status in Claude Code and look for the Kadraris base URL. When requests fail, the status code usually tells you why:
| Code | Likely reason |
|---|---|
401 | The key is wrong, or an older key is still set in another variable such as ANTHROPIC_API_KEY |
402 | Not enough balance, top up |
403 | This key has reached its spend limit |
404 on some calls | A model id outside the catalog; set both ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL |
There is no 1M-token context mode. Kadraris strips context-1m-* beta flags and the [1m] model suffix, so requests always use the model's standard context window.
Want to know what a session cost? Read GET /v1/balance before you start and again when you finish.
Media generation from Claude Code over MCP
Claude Code is not limited to text. With the Kadraris MCP server connected, it can also produce video, images and music. One command adds it:
claude mcp add --transport http kadraris https://kadraris.com/mcp --header "Authorization: Bearer sk-kd-..."After that you can ask something like "make a 5-second 9:16 Seedance 2.5 clip of a bakery opening at dawn, tell me the cost first". The available tools, the --scope user option and safety advice are on the MCP server page.
Cursor
- Go to Settings and open Models.
- Paste your
sk-kd-...key into the OpenAI API key field. - Switch on Override OpenAI Base URL and type
https://kadraris.com/v1. - Add a custom model using a Kadraris id such as
claude-sonnet-5orgpt-6-sol, then choose it in the chat panel.
Cline
Fill in Cline's settings panel like this:
| Setting | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://kadraris.com/v1 |
| API Key | sk-kd-... |
| Model ID | claude-sonnet-5 (any chat model id works) |
Continue
Add the models to ~/.continue/config.yaml:
models:
- name: Kadraris Claude Sonnet 5
provider: openai
model: claude-sonnet-5
apiBase: https://kadraris.com/v1
apiKey: sk-kd-...
- name: Kadraris DeepSeek
provider: openai
model: deepseek-v4-flash
apiBase: https://kadraris.com/v1
apiKey: sk-kd-...Roo Code
Roo Code takes the same values as Cline. In its settings, set API Provider: OpenAI Compatible, then Base URL https://kadraris.com/v1, API Key sk-kd-... and Model claude-sonnet-5 or another chat model.
OpenCode
Edit opencode.json, either in the project or in ~/.config/opencode/:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"kadraris": {
"npm": "@ai-sdk/openai-compatible",
"name": "Kadraris",
"options": {
"baseURL": "https://kadraris.com/v1",
"apiKey": "{env:KADRARIS_API_KEY}"
},
"models": {
"claude-sonnet-5": { "name": "Claude Sonnet 5" },
"gpt-6-sol": { "name": "GPT-6 Sol" }
}
}
}
}The key comes from the KADRARIS_API_KEY variable. The MCP server for media can be added to this same file, as shown in MCP server.
Aider
On macOS and Linux:
export OPENAI_API_BASE=https://kadraris.com/v1
export OPENAI_API_KEY=sk-kd-...
aider --model openai/claude-sonnet-5On Windows (open a new terminal after setx):
setx OPENAI_API_BASE https://kadraris.com/v1
setx OPENAI_API_KEY sk-kd-...
aider --model openai/claude-sonnet-5The openai/ part signals to Aider that the endpoint is OpenAI-compatible. What follows it is the Kadraris model id.
Zed
Add a provider in Zed's settings.json:
{
"language_models": {
"openai_compatible": {
"Kadraris": {
"api_url": "https://kadraris.com/v1",
"available_models": [
{ "name": "claude-sonnet-5", "display_name": "Claude Sonnet 5", "max_tokens": 200000 }
]
}
}
}
}The key itself goes into the provider settings in Zed's AI panel, not into settings.json. max_tokens is how much context Zed is allowed to send; 200000 is a safe choice, and each model's real window is listed on its page in the catalog.
Any other OpenAI-compatible tool
Tools built on the OpenAI SDK usually pick up these two variables:
export OPENAI_BASE_URL=https://kadraris.com/v1
export OPENAI_API_KEY=sk-kd-...When a tool offers a field named "custom endpoint", "OpenAI-compatible provider" or "base URL", fill it with https://kadraris.com/v1, your key, and a model id from Models.
For Codex CLI, Claude Desktop, VS Code and the rest, see the overview in Integrations.























