Continue is an open-source AI coding assistant for VS Code and JetBrains IDEs. It supports chat, inline edits, codebase context, custom model providers, and tab autocomplete. If you want to use Claude models in VS Code through an OpenAI-compatible endpoint, Continue is one of the more flexible options.
This guide shows how to connect Continue to Claude models through claudeapi.com. The practical setup is straightforward:
- Install Continue in VS Code.
- Create a ClaudeAPI key.
- Add Claude models to Continue’s config.
- Assign a faster model to autocomplete.
- Test chat, edits, and tab completion.
Important 2026 note: Continue’s current documentation recommends config.yaml for new configurations. Older tutorials often use config.json; that format is now documented as deprecated. This guide uses YAML first and includes a legacy JSON section for teams still running older Continue setups.
What you need
Before starting, make sure you have:
- VS Code installed
- the Continue extension installed
- a ClaudeAPI account
- a ClaudeAPI key from the dashboard
- a Claude model enabled in your ClaudeAPI account
ClaudeAPI’s OpenAI-compatible base URL is:
https://gw.claudeapi.com/v1
https://gw.claudeapi.com/v1
Do not remove /v1, and do not add a trailing slash.
Step 1: Install Continue
In VS Code:
- Open the Extensions panel with
Ctrl+Shift+Xon Windows/Linux orCmd+Shift+Xon macOS. - Search for
Continue. - Install the extension published by Continue Dev Inc.
- Open Continue from the left activity bar.
Continue stores local configuration under:
macOS / Linux: ~/.continue
Windows: %USERPROFILE%\.continue
macOS / Linux: ~/.continue
Windows: %USERPROFILE%\.continue
For a new setup, create or edit:
~/.continue/config.yaml
~/.continue/config.yaml
On Windows, the path is usually:
C:\Users\<your-username>\.continue\config.yaml
C:\Users\<your-username>\.continue\config.yaml
You can also access configuration from the Continue sidebar by opening the config or agent selector and clicking the gear icon.
Step 2: Create a ClaudeAPI key
Go to claudeapi.com, create an account, and generate an API key in the dashboard.
Use the key that starts with sk-. Keep it private:
- Do not commit it to Git.
- Do not paste it into public screenshots.
- Do not share it in issue reports.
- For teams, consider separate keys per developer, tool, or environment.
For local testing, you can paste the key directly into Continue’s config. For team-managed environments, prefer environment variables or a secrets manager if your workflow supports it.
Step 3: Configure Continue with config.yaml
Continue uses model roles to decide where each model is available. Common roles include:
| Role | Purpose |
|---|---|
chat |
Continue chat panel |
edit |
Inline edits and code transformations |
apply |
Applying generated code changes |
autocomplete |
Tab completion |
Here is a practical multi-model configuration:
name: ClaudeAPI Continue Config
version: 1.0.0
schema: v1
models:
- name: Claude Sonnet 4.6
provider: openai
model: claude-sonnet-4-6
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- chat
- edit
- apply
- name: Claude Opus 4.8
provider: openai
model: claude-opus-4-8
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- chat
- edit
- apply
- name: Claude Haiku 4.5 Autocomplete
provider: openai
model: claude-haiku-4-5-20251001
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- autocomplete
autocompleteOptions:
maxPromptTokens: 2048
debounceDelay: 250
name: ClaudeAPI Continue Config
version: 1.0.0
schema: v1
models:
- name: Claude Sonnet 4.6
provider: openai
model: claude-sonnet-4-6
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- chat
- edit
- apply
- name: Claude Opus 4.8
provider: openai
model: claude-opus-4-8
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- chat
- edit
- apply
- name: Claude Haiku 4.5 Autocomplete
provider: openai
model: claude-haiku-4-5-20251001
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- autocomplete
autocompleteOptions:
maxPromptTokens: 2048
debounceDelay: 250
Replace your-api-key-here with your ClaudeAPI key.
This setup gives you:
- Sonnet 4.6 for everyday coding, explanations, review, and refactoring
- Opus 4.8 for complex architecture work and long-context analysis
- Haiku 4.5 for fast tab autocomplete
Step 4: Pick models by task
Using one model for every task is usually inefficient. Route by workload:
| Model | Best fit | Reason |
|---|---|---|
claude-haiku-4-5-20251001 |
Tab autocomplete, simple questions, quick transformations | Lower latency and lower cost |
claude-sonnet-4-6 |
Daily coding help, review, API explanations, medium refactors | Balanced default |
claude-opus-4-8 |
Complex refactors, architecture decisions, long-context reasoning | Reserve for high-value tasks |
The source draft lists ClaudeAPI prices as:
| Model | ClaudeAPI input / output price |
|---|---|
claude-haiku-4-5-20251001 |
$0.8 / $4 per MTok |
claude-sonnet-4-6 |
$2.4 / $12 per MTok |
claude-opus-4-8 |
$4 / $20 per MTok |
Prices and model availability can change. Check the ClaudeAPI console before publishing internal cost policies or setting team budgets.
Step 5: Enable tab autocomplete
Autocomplete is latency-sensitive. Use a faster model for completions instead of your most expensive reasoning model.
In the YAML config above, Haiku is assigned only to the autocomplete role:
- name: Claude Haiku 4.5 Autocomplete
provider: openai
model: claude-haiku-4-5-20251001
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- autocomplete
autocompleteOptions:
maxPromptTokens: 2048
debounceDelay: 250
- name: Claude Haiku 4.5 Autocomplete
provider: openai
model: claude-haiku-4-5-20251001
apiKey: your-api-key-here
apiBase: https://gw.claudeapi.com/v1
roles:
- autocomplete
autocompleteOptions:
maxPromptTokens: 2048
debounceDelay: 250
After saving the file, return to VS Code and type in a code file. Continue should start showing inline suggestions. Press Tab to accept and Esc to dismiss.
If autocomplete is slow:
- keep autocomplete on Haiku
- reduce
maxPromptTokens - avoid using reasoning-heavy models for autocomplete
- check whether another extension is also trying to provide completions
Step 6: Test the setup
After saving config.yaml, reload VS Code if the Continue model list does not refresh.
In Continue chat, send:
Write a Python bubble sort function and explain the time complexity.
Write a Python bubble sort function and explain the time complexity.
Check that:
- the model dropdown shows your configured Claude models
- chat returns normally
- inline edits work on selected code
- autocomplete appears while editing a supported file type
If chat works but autocomplete does not, inspect the role configuration. The autocomplete model must include:
roles:
- autocomplete
roles:
- autocomplete
Optional: add shared coding rules
Continue’s YAML config supports a top-level rules field. Use it to keep responses aligned with your team’s coding style:
rules:
- Always prefer TypeScript examples unless another language is requested.
- Add JSDoc comments for exported functions.
- Keep answers concise and include runnable code when possible.
rules:
- Always prefer TypeScript examples unless another language is requested.
- Add JSDoc comments for exported functions.
- Keep answers concise and include runnable code when possible.
This is the cleaner YAML-era replacement for many older systemMessage examples in config.json.
Legacy option: config.json
If your Continue installation still uses config.json, the older format may look like this:
{
"models": [
{
"title": "Claude Sonnet 4.6",
"provider": "openai",
"model": "claude-sonnet-4-6",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
},
{
"title": "Claude Opus 4.8",
"provider": "openai",
"model": "claude-opus-4-8",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
},
{
"title": "Claude Haiku 4.5",
"provider": "openai",
"model": "claude-haiku-4-5-20251001",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
}
],
"tabAutocompleteModel": {
"title": "Claude Haiku 4.5 Autocomplete",
"provider": "openai",
"model": "claude-haiku-4-5-20251001",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
},
"tabAutocompleteOptions": {
"maxPromptTokens": 2048
}
}
{
"models": [
{
"title": "Claude Sonnet 4.6",
"provider": "openai",
"model": "claude-sonnet-4-6",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
},
{
"title": "Claude Opus 4.8",
"provider": "openai",
"model": "claude-opus-4-8",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
},
{
"title": "Claude Haiku 4.5",
"provider": "openai",
"model": "claude-haiku-4-5-20251001",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
}
],
"tabAutocompleteModel": {
"title": "Claude Haiku 4.5 Autocomplete",
"provider": "openai",
"model": "claude-haiku-4-5-20251001",
"apiKey": "your-api-key-here",
"apiBase": "https://gw.claudeapi.com/v1"
},
"tabAutocompleteOptions": {
"maxPromptTokens": 2048
}
}
For new installations, prefer config.yaml. Continue’s own documentation marks config.json as deprecated.
If you use a legacy system prompt in JSON, it may look like this:
"systemMessage": "You are a TypeScript-focused coding assistant. Always add JSDoc comments for exported functions."
"systemMessage": "You are a TypeScript-focused coding assistant. Always add JSDoc comments for exported functions."
For YAML configs, use top-level rules instead when possible.
Continue vs Claude Code plugin vs Cline
If you use multiple VS Code AI tools, do not mix up their configuration paths.
| VS Code tool | Configuration method |
|---|---|
| Continue | Edit ~/.continue/config.yaml or legacy config.json |
| Claude Code plugin | Can be managed through CC Switch if that option is enabled |
| Cline | Configure the plugin’s provider settings directly |
| Cursor | Configure Cursor Settings, not Continue settings |
For the Claude Code VS Code plugin, CC Switch may expose an option similar to:
CC Switch -> Settings -> General -> Apply to Claude Code plugin
CC Switch -> Settings -> General -> Apply to Claude Code plugin
When enabled, the Claude Code plugin follows the provider selected in CC Switch. This does not affect Continue. Continue still reads its own config file.
After changing CC Switch settings, restart VS Code and send a test message from the Claude Code plugin. For Continue, reload Continue or VS Code after editing its config.
Troubleshooting
401 Unauthorized
The API key is invalid, expired, copied with extra whitespace, or from the wrong provider.
Fix:
- copy the key again from the ClaudeAPI console
- confirm it starts with
sk- - check that your account has available balance or quota
404 Not Found
The API base is usually wrong.
Use:
https://gw.claudeapi.com/v1
https://gw.claudeapi.com/v1
Do not use:
https://gw.claudeapi.com
https://gw.claudeapi.com/v1/
https://gw.claudeapi.com/v1/chat/completions
https://gw.claudeapi.com
https://gw.claudeapi.com/v1/
https://gw.claudeapi.com/v1/chat/completions
Continue expects the base path. It appends the actual endpoint internally.
The model does not appear in Continue
Check these fields:
provider: openai
model: claude-sonnet-4-6
apiBase: https://gw.claudeapi.com/v1
roles:
- chat
provider: openai
model: claude-sonnet-4-6
apiBase: https://gw.claudeapi.com/v1
roles:
- chat
If you are using YAML, verify indentation. YAML is whitespace-sensitive.
Model name errors
Model IDs must match exactly. For example:
claude-haiku-4-5-20251001
claude-haiku-4-5-20251001
Do not shorten it to:
haiku
haiku
Autocomplete is slow
Use a faster model and reduce prompt size:
autocompleteOptions:
maxPromptTokens: 2048
debounceDelay: 250
autocompleteOptions:
maxPromptTokens: 2048
debounceDelay: 250
Also confirm the autocomplete model has only the autocomplete role if you want clean routing.
Windows path issues
On Windows, the config directory is:
C:\Users\<your-username>\.continue
C:\Users\<your-username>\.continue
If .continue does not exist, restart VS Code after installing Continue. The extension should create the directory.
Continue does not follow CC Switch
That is expected. CC Switch can manage Claude Code-related configuration, but it does not rewrite Continue’s config. Continue must be configured separately.
Related guides
- Claude API Base URL configuration guide
- Claude API pricing and model selection guide
- Cursor Claude API setup guide
- Migrate from OpenAI API to Claude API
- Claude API cost estimation and budget guide
Start using Claude in VS Code
With Continue and ClaudeAPI, you can keep VS Code as your main editor while routing chat, edits, and autocomplete to Claude models through an OpenAI-compatible endpoint.
Start with Sonnet for everyday coding, add Haiku for autocomplete, and keep Opus available for complex refactors or long-context analysis. That gives you a practical balance between speed, cost, and quality.
Create an API key at claudeapi.com, paste it into Continue’s config, and run your first chat request from VS Code. If you run into setup issues, check the ClaudeAPI docs or contact support.
Sources
- Continue Docs: config.yaml reference
- Continue Docs: Migrating Config to YAML
- Continue Docs: OpenAI model provider
- Continue Docs: Autocomplete setup
- Continue Docs: config.json reference, deprecated



