Which option to use
| Option | Chat and agent | Ghost-text autocomplete | FreeLLMAPI endpoint |
|---|---|---|---|
| Copilot Chat with a Custom Endpoint (BYOK) | Yes | No. Copilot inline suggestions need a GitHub account and do not use BYOK models. | /v1/chat/completions or /v1/messages |
| Cline or Kilo Code | Yes, agent with file edits and commands | No | /v1/chat/completions |
| Continue | Yes | Yes | /v1/chat/completions and /v1/completions |
All three run on your computer, so they can reach http://localhost:3001. You can use more than one. For example, use Copilot Chat or Cline for agent work and Continue for autocomplete.
Step 1: Install FreeLLMAPI
FreeLLMAPI is an open-source gateway. It pools the free tiers of 45 providers behind one key. It speaks the OpenAI and Anthropic formats.
Install on macOS or Linux
curl -fsSL https://freellmapi.co/install.sh | bashOpen http://localhost:3001. Add at least two free provider keys on the Keys page. Copy your unified key from the same page.
Option 1: Copilot Chat with a Custom Endpoint
VS Code calls this feature bring your own key (BYOK). The Custom Endpoint provider replaces the older OpenAI Compatible provider. The github.copilot.chat.customOAIModels setting is deprecated.
- Open the Chat view. In the model picker, select Manage Language Models. You can also run Chat: Manage Language Models from the Command Palette.
- Select Add Models, then Custom Endpoint.
- Enter a group name, a display name and the API key. For the key, enter your FreeLLMAPI unified key.
- Select the API type Chat Completions.
- VS Code opens
chatLanguageModels.json. Enter the model details as in the example below. Save the file. - Select the model in the Chat view model picker.
chatLanguageModels.json
[
{
"name": "FreeLLMAPI",
"vendor": "customendpoint",
"apiKey": "${input:freellmapiKey}",
"models": [
{
"id": "auto",
"name": "FreeLLMAPI Auto",
"url": "http://localhost:3001/v1/chat/completions",
"toolCalling": true,
"vision": false,
"maxInputTokens": 128000,
"maxOutputTokens": 8192
}
]
}
]- The VS Code docs recommend the full endpoint URL with the API path. If you enter only
http://localhost:3001/v1, VS Code adds/chat/completions. - Keep the key in an input variable such as
${input:freellmapiKey}. Do not put the raw key in the file. - Set
toolCallingtotrue. VS Code does not show a model in the agent model picker if it does not support tool calling. - To use the Anthropic format, set
"apiType": "messages"and the URLhttp://localhost:3001/v1/messages.
On plans, the GitHub docs say that BYOK lets you use models without a Copilot subscription. The VS Code docs give more rules for each chat session type, so check them for your version. On Copilot Business and Enterprise, an administrator can turn off the BYOK policy. Some features still need a GitHub account: inline suggestions, semantic search and features that use embeddings. BYOK applies to chat and utility tasks only.
Option 2: Cline or Kilo Code for agent work
Cline and Kilo Code are agent extensions. They read files, edit them and run commands. Each one has a setup command:
Cline or Kilo Code
npx freellmapi setup-cline --url http://localhost:3001 --api-key <unified-key>
npx freellmapi setup-kilo --url http://localhost:3001To set up Cline manually, open the Cline settings and set API Provider to OpenAI Compatible. Set the Base URL to http://localhost:3001/v1. Read Cline, Roo Code and Kilo Code with a free API for all steps.
Option 3: Continue for free ghost-text autocomplete
Copilot BYOK does not give ghost text. Continue does. FreeLLMAPI serves autocomplete clients on /v1/completions. Add this model to ~/.continue/config.yaml and put the key in ~/.continue/.env:
~/.continue/config.yaml (autocomplete model)
models:
- name: FreeLLMAPI Autocomplete
provider: openai
model: auto
apiBase: http://localhost:3001/v1
apiKey: ${{ secrets.FREELLMAPI_API_KEY }}
useLegacyCompletionsEndpoint: true
roles:
- autocompleteRead Continue with a free LLM API for the complete file and for autocomplete settings that send fewer requests.
Choose models and stay inside the limits
Agent mode sends long prompts with tool definitions. Use models with tool calling and a large context window. The table shows free models that meet both rules today.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| GLM 5.3 | UnoRouter | 1M | 1 req/min 1 req/min per model | Yes | No |
| GLM 5.3 Flash | NVIDIA NIM, UnoRouter | 1M | 40 req/min 40 RPM | Yes | Yes |
| Gemini 3.8 Flash | Google AI Studio | 1M | Recurring provider quota | Yes | Yes |
| Qwen3.8 Flash Next | AMD Radeon Cloud | 262K | Recurring daily account allowance | Yes | No |
| Qwen3.8 Flash | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| GPT-5.6 Luna | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Dots3 Note Preview | Kilo Gateway, OpenRouter | 512K | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | Yes |
| DeepSeek V4 Flash | AMD Radeon Cloud, BazaarLink, ElectronHub | 1M | 10 req/min 50 req/day Shared rate limit | Yes | No |
| Qwen3.8 27B | ElectronHub, Groq, OVH AI Endpoints | 262K | 30 req/min 250 req/day 70,000 tokens/min ~6M | Yes | Yes |
Showing 10 of 109 matching free models. See all models.
Live data from the FreeLLMAPI catalog (version 2026.11.19, checked 19 November 2026). Free limits change often. The catalog is checked every day.
Free tiers have limits per minute and per day. When a provider sends a 429 error, FreeLLMAPI tries the next model in your chain. Add keys from four or more providers. The X-Routed-Via response header shows the provider that answered.
| Problem | Cause | Fix |
|---|---|---|
| The model is not in the agent model picker | toolCalling is not true | Set "toolCalling": true in chatLanguageModels.json |
| No Custom Endpoint option | Your organization turned off the BYOK policy | Ask your Copilot administrator, or use Cline or Continue |
401 "Invalid API key" | The key is not your FreeLLMAPI unified key | Copy the unified key again from the Keys page |
| No ghost text from your model | Copilot inline suggestions do not use BYOK models | Use Continue for autocomplete |
| "All models rate-limited after N attempts" | All keys are at their limit | Add keys from more providers, or wait for the cooldowns |
Frequently asked questions
Can I use GitHub Copilot with my own API key?
Yes. In VS Code, open Chat: Manage Language Models, select Add Models and then Custom Endpoint. BYOK applies to chat and utility tasks. Inline suggestions still use GitHub's models.
Do I need a Copilot subscription for bring your own key?
The GitHub docs say that BYOK lets you use models without a Copilot subscription. On Copilot Business and Enterprise, an administrator can turn the BYOK policy off.
How do I get free AI autocomplete in VS Code?
Install Continue and add a model with the autocomplete role and useLegacyCompletionsEndpoint: true. Point it at FreeLLMAPI on http://localhost:3001/v1.
Which free AI model is best in VS Code?
For agent mode, use a model with tool calling and at least 128K context. For autocomplete, use a fast model. The table on this page shows today's free agent models.
Is the OpenAI Compatible provider in Copilot deprecated?
Yes. The VS Code docs say that the Custom Endpoint provider replaces the deprecated OpenAI Compatible provider, and that github.copilot.chat.customOAIModels is deprecated.
Related guides
- Cline, Roo Code and Kilo Code with a free API
- Continue with a free LLM API
- Use Cursor with a free LLM API
- Best free coding model APIs
- Free OpenAI-compatible API base URLs
Sources
- VS Code docs: language models in chat (BYOK) (checked 20 November 2026)
- GitHub docs: bring your own key (checked 20 November 2026)
- Cline docs: OpenAI Compatible provider (checked 20 November 2026)
- Continue docs: OpenAI provider (checked 20 November 2026)
- FreeLLMAPI docs: clients and coding agents (checked 20 November 2026)