Claude Code
Configure a custom API endpoint in Claude Code by setting two environment variables.
Windows
# PowerShell
$env:ANTHROPIC_BASE_URL="https://rabbitcode.top/claude"
$env:ANTHROPIC_API_KEY="sk-your-api-key"
Or via System Settings → About → Advanced System Settings → Environment Variables
macOS / Linux
# ~/.bashrc or ~/.zshrc
export ANTHROPIC_BASE_URL="https://rabbitcode.top/claude"
export ANTHROPIC_API_KEY="sk-your-api-key"
VS Code (settings.json)
{
"anthropic.baseUrl": "https://rabbitcode.top/claude",
"anthropic.apiKey": "sk-your-api-key"
}
Configuration notes:- • ANTHROPIC_BASE_URLANTHROPIC_BASE_URL: the base URL:
https://rabbitcode.top/claude - • ANTHROPIC_API_KEY:ANTHROPIC_API_KEY: your API key (create one in the console)
Cline / Roo Code
Cline and Roo Code are popular AI coding extensions for VS Code that support custom API endpoints.
- Install the Cline or Roo Code extension
- Open the extension settings and choose OpenAI Compatible as the API provider
- Fill in the configuration below:
API Base URL:https://rabbitcode.top/claude/v1API Key:sk-your-api-keyModel ID:claude-opus-4-6
View available models: after signing in to the console, see the "Models" page for all available model IDs.
OpenCode
OpenCode is an open-source terminal AI coding assistant. It can connect to custom APIs via the OpenAI-compatible adapter.
Step 1: Install the adapter
npm install -g @ai-sdk/openai-compatible
Step 2: Create a config file
Create opencode.json in the project root (or globally at ~/.config/opencode/opencode.json):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"rabbitcode": {
"npm": "@ai-sdk/openai-compatible",
"name": "RabbitCode",
"options": {
"baseURL": "https://rabbitcode.top/claude/v1",
"apiKey": "{env:RABBITCODE_API_KEY}"
},
"models": {
"claude-opus-4-6": {
"name": "Claude Opus 4",
"limit": { "context": 200000, "output": 32000 }
},
"claude-sonnet-4-20250514": {
"name": "Claude Sonnet 4",
"limit": { "context": 200000, "output": 65536 }
}
}
}
},
"model": "rabbitcode/claude-opus-4-6"
}
Step 3: Set your API key
# macOS / Linux
export RABBITCODE_API_KEY="sk-your-api-key"
# Windows PowerShell
$env:RABBITCODE_API_KEY = "sk-your-api-key"
Common pitfalls:baseURL baseURL must end with /v1 — do not use /v1/chat/completions- Each model must declare limit.context and limit.output manually
- Make sure @ai-sdk/openai-compatible is installed globally
Cursor
Cursor is an AI-integrated code editor that supports custom API keys (BYOK mode) for third-party API services.
Configuration steps
- Open Cursor and click Settings in the bottom-left (gear icon)
- Go to the Models settings page
- Find the OpenAI API Keys section and paste your API key
- Enable Override OpenAI Base URL and fill in:
https://rabbitcode.top/claude/v1
- Click Verify to test the connection
- In the model list below, check the models you need, or click + Add model to manually add a model ID:
claude-opus-4-6
claude-sonnet-4-20250514
gpt-4o
deepseek-chat
- Save the settings and restart Cursor for them to take effect
Known limitations:- Override Base URL applies to all models using the OpenAI key; you cannot target a single model
- Some Cursor-specific features (e.g. Tab autocomplete) require specific models and do not support custom keys
- If you see TLS or connection errors, try disabling HTTP/2 in Cursor advanced settings
Recommended configuration:You can also fill in a key in the Anthropic API Keys section on the Models page — Cursor will automatically route Claude-series models. But using Override Base URL lets a single key cover all models.
Cherry Studio
Cherry Studio is a multi-model desktop AI client with support for custom OpenAI-compatible endpoints.
- Download and install Cherry Studio
- Open Settings → Model Providers → Add Custom Provider
- Fill in the configuration:
- Name:RabbitCode
- API URL:
https://rabbitcode.top/claude - API Key:
- Click "Fetch model list" or manually add a model ID such as claude-opus-4-6
- Select the RabbitCode provider and the model in the chat interface to start
Note: Cherry Studio does not require /v1 at the end of the API URL — it appends it automatically. If the call fails, check that you did not double-add the path.
ChatBox
ChatBox is a cross-platform AI desktop client (Windows / macOS / Linux / iOS / Android).
- Download and install ChatBox
- Open Settings → AI Model Provider → choose OpenAI API
- Fill in the configuration:
- API Domain:
https://rabbitcode.top/claude - API Key:
- Model:claude-opus-4-6
- Save and start using it on the chat page
Multi-model switching: you can add multiple model configurations (e.g. gpt-4o, deepseek-chat) and switch any time during a conversation.