Use AnyAPI in VS Code
AnyAPI works with any VS Code AI plugin that supports custom OpenAI-compatible endpoints. Point the plugin athttps://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
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:
- 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.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:
- 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
Tabto accept suggestions - Refactoring — Select code, press
Ctrl+Shift+L/Cmd+Shift+Land describe the change
Option 3: GitHub Copilot BYOK
Use AnyAPI models inside GitHub Copilot Chat with Bring Your Own Key.Setup
- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Type
Chat: Manage Language Models - Click Add Models → Custom Endpoint
- Configure the provider:
- Add a model:
- Save — the model appears in the Copilot Chat model picker
chatLanguageModels.json file:
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.Setup
- Open VS Code Insiders
- Click the model dropdown in Copilot Chat
- Select Manage Language Models…
- Click Add Models → Custom Endpoint
- Fill in:
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 forlitellm - Set:
LiteLLM Provider for Copilot Chat
- Install LiteLLM Provider for Copilot Chat
Cmd+Shift+P→LiteLLM: Add Server- Enter label
AnyAPI, URLhttps://api.anyapi.ai, and your API key
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/v1Cmd+Shift+P→vscode-openai: Set API Key→ your AnyAPI key
Comparison
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
Troubleshooting
”Model not found”
Use the fullprovider/model format. Check available models:
“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