VS Code Extensions
Claude API for VS Code — configure Continue, Cline, and Roo Code extensions with your Claude API key.
Continue
Example config.yaml model entry (uses the latest flagship Claude Opus 4.7):
name: Claude API
version: 1.0.0
schema: v1
models:
- name: Claude Opus 4.7
provider: anthropic
model: claude-opus-4.7
apiBase: https://api.llmsrelay.com
apiKey: sk-cs4-YOUR_KEY
roles:
- chat
- editCline
Use OpenAI Compatible provider:
- Custom BaseURL:
https://api.llmsrelay.com/v1 - API Key: from the dashboard
Roo Code
Use OpenAI Compatible provider:
- Custom BaseURL:
https://api.llmsrelay.com/v1 - API Key: from the dashboard
Kilo Code
Kilo Code can use LLMsRelay through two custom providers: Anthropic Messages for Claude models and OpenAI Responses for GPT/Codex models. Keep them as separate providers because the wire protocols are different.
Choose the matching key group
1. Add the provider
Open Kilo's provider settings or edit the user-level kilo.jsonc file. The example below is portable and contains no real credentials:
{
"$schema": "https://app.kilo.ai/config.json",
"provider": {
"llmsrelay-anthropic": {
"name": "LLMsRelay Anthropic Messages",
"npm": "@ai-sdk/anthropic",
"options": {
"baseURL": "https://api.llmsrelay.com/v1"
},
"models": {
"claude-opus-5": { "name": "claude-opus-5", "reasoning": true },
"claude-fable-5": { "name": "claude-fable-5", "reasoning": true },
"claude-opus-4.8": { "name": "claude-opus-4.8", "reasoning": true },
"claude-opus-4.7": { "name": "claude-opus-4.7", "reasoning": true },
"claude-opus-4.6": { "name": "claude-opus-4.6", "reasoning": true },
"claude-sonnet-5": { "name": "claude-sonnet-5", "reasoning": true },
"claude-sonnet-4.6": { "name": "claude-sonnet-4.6", "reasoning": true },
"claude-haiku-4.5": { "name": "claude-haiku-4.5", "reasoning": true }
}
},
"llmsrelay-openai": {
"name": "LLMsRelay OpenAI Responses",
"npm": "@ai-sdk/openai",
"env": ["OPENAI_API_KEY"],
"options": {
"baseURL": "https://api.llmsrelay.com/v1"
},
"models": {
"gpt-5.3-codex-spark": { "name": "gpt-5.3-codex-spark", "reasoning": true },
"gpt-5.4-mini": { "name": "gpt-5.4-mini", "reasoning": true },
"gpt-5.4": { "name": "gpt-5.4", "reasoning": true },
"codex-auto-review": { "name": "codex-auto-review", "reasoning": true },
"gpt-5.3-codex-spark-openai-compact": { "name": "gpt-5.3-codex-spark-openai-compact", "reasoning": true },
"gpt-5.5": { "name": "gpt-5.5", "reasoning": true },
"gpt-5.5-openai-compact": { "name": "gpt-5.5-openai-compact", "reasoning": true },
"gpt-5.6-terra": { "name": "gpt-5.6-terra", "reasoning": true },
"gpt-5.4-openai-compact": { "name": "gpt-5.4-openai-compact", "reasoning": true },
"gpt-5.4-mini-openai-compact": { "name": "gpt-5.4-mini-openai-compact", "reasoning": true },
"gpt-5.6-sol": { "name": "gpt-5.6-sol", "reasoning": true }
}
}
}
}2. Add the API key securely
Add a Basic key to the Anthropic provider and a separateCodex key to the OpenAI provider through Kilo's credential dialog or the /connect flow. Use separate placeholders such as sk-cs4-YOUR_BASIC_KEY and sk-cs4-YOUR_CODEX_KEY. Do not put a real key in kilo.jsonc, workspace files, screenshots, or a public repository.
3. Select a model
Select the exact ID returned by GET /v1/models. Claude IDs belong to the Anthropic provider; GPT/Codex IDs belong to the OpenAI Responses provider. For example, use gpt-5.5, not a shortened alias. OpenAI models are sent to /v1/responses; Claude models are sent to /v1/messages.
Windows setup (all extensions)
On Windows, Continue, Cline, Roo Code, and Kilo Code use the same gateway, but their provider settings differ. Follow the shared environment-variable steps below, then use the extension-specific notes.
1. Prerequisites
- VS Code 1.80+ (latest recommended)
- Node.js LTS — required only if you use Continue's CLI/MCP features. Verify with
node -vin PowerShell. - Your LLMsRelay API keys:
sk-cs4-YOUR_BASIC_KEYfor Claude andsk-cs4-YOUR_CODEX_KEYfor OpenAI.
2. Set environment variables (PowerShell)
Open PowerShell (not cmd.exe) and run. setx writes to the user environment permanently — values become available in every new terminal and process.
setx ANTHROPIC_BASE_URL "https://api.llmsrelay.com"
setx ANTHROPIC_API_KEY "sk-cs4-YOUR_BASIC_KEY"
setx OPENAI_BASE_URL "https://api.llmsrelay.com/v1"
setx OPENAI_API_KEY "sk-cs4-YOUR_CODEX_KEY"GUI alternative: press Win+R → type sysdm.cpl → Advanced → Environment Variables → add the same five variables under "User variables".
3. Fully restart VS Code
VS Code caches environment variables at launch. After setx, close every VS Code window, then open Task Manager (Ctrl+Shift+Esc) and end any remaining Code.exe processes before reopening. Otherwise the extensions will still see old values.
4. Per-extension Windows notes
- Continue — config lives at
%USERPROFILE%\.continue\config.yaml. Open it withnotepad %USERPROFILE%\.continue\config.yamlin PowerShell. - Cline / Roo Code — open the extension's settings panel, choose OpenAI Compatible, paste Base URL
https://api.llmsrelay.com/v1and your API key. The env vars from step 2 are used as defaults for new tasks but the UI values always win. - Kilo Code — add the two custom providers from the Kilo Code section above. Store the key for each provider through Kilo credentials or
/connect, and select an exact model ID fromGET /v1/models.
5. Using WSL / Remote-WSL?
Windows env vars do not propagate into the WSL distro. Add the same variables to ~/.bashrc (or ~/.zshrc) inside WSL:
export ANTHROPIC_BASE_URL="https://api.llmsrelay.com"
export ANTHROPIC_API_KEY="sk-cs4-YOUR_BASIC_KEY"
export OPENAI_BASE_URL="https://api.llmsrelay.com/v1"
export OPENAI_API_KEY="sk-cs4-YOUR_CODEX_KEY"6. Troubleshooting
setxnever affects the current terminal — open a new one.- In PowerShell always wrap values in double quotes, especially URLs with
/. - Behind a corporate proxy: also set
setx HTTPS_PROXY "http://proxy.company:8080". - Antivirus / firewall blocking requests — whitelist the host
api.llmsrelay.com. - Wrong model is being called — see Common Claude Code configuration mistakes.
Wrong model is being used?
Check ANTHROPIC_MODEL conflicts
model and an ANTHROPIC_MODEL environment override.