Use AnyAPI in VS Code
AnyAPI works with any VS Code AI plugin that supports custom OpenAI-compatible endpoints. Point the plugin at https://api.anyapi.ai/v1, add your API key, and you get access to 300+ models.
Prerequisites
Get your API key from the AnyAPI Dashboard
Pick a model from the model catalog
All plugins below use the same connection details:
Parameter Value Base URL https://api.anyapi.ai/v1API Key Your AnyAPI key (sk-...) Model ID e.g. openai/gpt-4o, anthropic/claude-sonnet-4
AnyAPI uses provider/model format for model IDs. Bare names like gpt-4o without the vendor prefix won’t work. Browse all models at anyapi.ai/ai-models .
Option 1: Cline (Recommended)
Autonomous AI coding agent. Edits files, runs terminal commands, browses the web. No sign-up required — setup takes 30 seconds.
Setup
Install Cline from the Extensions marketplace (Ctrl+Shift+X / Cmd+Shift+X)
Open the Cline panel in the sidebar
Click the gear icon (Settings)
Set API Provider to OpenAI Compatible
Fill in:
Field Value Base URL https://api.anyapi.ai/v1API Key Your AnyAPI key Model ID e.g. anthropic/claude-sonnet-4
Click Save — you’re ready to go
Usage
Type a task in the chat (e.g. “Create a REST API with Express”) and Cline will autonomously create files, install dependencies, and write code. It asks for approval before each action.
Use large-context models like anthropic/claude-sonnet-4 for complex tasks and cheaper models like openai/gpt-4o-mini for quick fixes.
Option 2: Continue.dev
Open-source AI assistant with chat, autocomplete, refactoring, and code explanation.
Setup
Install Continue from the Extensions marketplace
Sign in with a Continue.dev account when prompted
Open ~/.continue/config.yaml (Cmd+Shift+P → Continue: Open configuration file)
Replace the contents with:
name : AnyAPI Config
version : 1.0.0
schema : v1
models :
- name : AnyAPI — Claude Sonnet
provider : openai
model : anthropic/claude-sonnet-4
apiBase : https://api.anyapi.ai/v1
apiKey : sk-your-anyapi-key
roles :
- chat
- edit
- name : AnyAPI — GPT-4o
provider : openai
model : openai/gpt-4o
apiBase : https://api.anyapi.ai/v1
apiKey : sk-your-anyapi-key
roles :
- chat
- edit
- name : AnyAPI Autocomplete
provider : openai
model : openai/gpt-4o-mini
apiBase : https://api.anyapi.ai/v1
apiKey : sk-your-anyapi-key
roles :
- autocomplete
Reload VS Code (Cmd+Shift+P → Developer: Reload Window)
Newer versions of Continue require signing in with a Continue.dev account on first launch. If the login hangs, reload VS Code and try again.
Usage
Chat — Open the Continue panel, select a model, and ask questions
Autocomplete — Start typing code, press Tab to accept suggestions
Refactoring — Select code, press Ctrl+Shift+L / Cmd+Shift+L and describe the change
Option 3: GitHub Copilot BYOK
Use AnyAPI models inside GitHub Copilot Chat with Bring Your Own Key.
Requires VS Code Insiders and a GitHub Copilot subscription (Free plan or above). If the Chat: Manage Language Models command is not found, download VS Code Insiders .
Setup
Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
Type Chat: Manage Language Models
Click Add Models → Custom Endpoint
Configure the provider:
Field Value API Key Your AnyAPI key API Type Chat Completions
Add a model:
Field Value ID anthropic/claude-sonnet-4Name AnyAPI Claude SonnetURL https://api.anyapi.ai/v1/chat/completions
Save — the model appears in the Copilot Chat model picker
This creates a chatLanguageModels.json file:
[
{
"vendor" : "customendpoint" ,
"apiKey" : "sk-your-anyapi-key" ,
"apiType" : "chat-completions" ,
"models" : [
{
"id" : "anthropic/claude-sonnet-4" ,
"name" : "AnyAPI Claude Sonnet" ,
"url" : "https://api.anyapi.ai/v1/chat/completions" ,
"toolCalling" : true ,
"maxInputTokens" : 200000 ,
"maxOutputTokens" : 16000
}
]
}
]
Copilot BYOK only applies to chat and agent mode. Inline autocomplete still uses GitHub’s own models.
Option 4: VS Code Native Custom Endpoint
Built-in support for custom AI endpoints, no extensions needed.
Currently available in VS Code Insiders only.
Setup
Open VS Code Insiders
Click the model dropdown in Copilot Chat
Select Manage Language Models…
Click Add Models → Custom Endpoint
Fill in:
Field Value Group Name AnyAPIDisplay Name GPT-4o via AnyAPIEndpoint URL https://api.anyapi.ai/v1/chat/completionsAPI Key Your AnyAPI key API Type Chat Completions
Option 5: LiteLLM Extensions
Two extensions designed for LiteLLM proxies — fully compatible with AnyAPI.
LiteLLM Connector for Copilot
Install LiteLLM Connector for Copilot
Open Settings (Ctrl+, / Cmd+,) and search for litellm
Set:
Setting Value Base URL https://api.anyapi.aiAPI Key Your AnyAPI key Default Model openai/gpt-4o
LiteLLM Provider for Copilot Chat
Install LiteLLM Provider for Copilot Chat
Cmd+Shift+P → LiteLLM: Add Server
Enter label AnyAPI, URL https://api.anyapi.ai, and your API key
Supports multiple servers, automatic model aggregation, and cheapest/fastest model selection.
Option 6: vscode-openai
Lightweight extension for OpenAI-compatible APIs.
Install vscode-openai
Cmd+Shift+P → vscode-openai: Set API URL → https://api.anyapi.ai/v1
Cmd+Shift+P → vscode-openai: Set API Key → your AnyAPI key
Comparison
Plugin Chat Autocomplete Agent Free Requires Cline Yes No Yes Yes — Continue.dev Yes Yes No Yes Continue account Copilot BYOK Yes No Yes No Copilot + VS Code Insiders VS Code Native Yes No Yes Yes VS Code Insiders LiteLLM Extensions Yes No No No Copilot vscode-openai Yes No No Yes —
Recommendations
Quick start, no sign-up — Cline
Autocomplete + chat — Continue.dev
Already use Copilot — BYOK or LiteLLM extensions
No extensions — VS Code Native Custom Endpoint (Insiders only)
Recommended Models for Coding
Model Best for anthropic/claude-sonnet-4Fast edits, everyday coding anthropic/claude-opus-4Complex architecture, deep reasoning openai/gpt-4oMulti-modal, broad knowledge openai/gpt-4o-miniAutocomplete, quick tasks deepseek/deepseek-r1Algorithms, math
Troubleshooting
”Model not found”
Use the full provider/model format. Check available models:
curl https://api.anyapi.ai/v1/models \
-H "Authorization: Bearer sk-your-anyapi-key"
“Unauthorized” (401)
Verify your API key is correct and active in the AnyAPI Dashboard .
”Payment Required” (402)
Top up your balance or check the limits on your key.
Slow responses
Use a faster model (openai/gpt-4o-mini)
Increase the timeout in plugin settings
Reduce maxTokens
Next Steps
Cline Guide Quick setup guide for Cline
Continue.dev Guide Quick setup guide for Continue.dev
All Integrations Browse all supported tools
Model Catalog Browse 300+ available models