Guide

Free AI models in VS Code

VS Code has three ways to use your own model API. GitHub Copilot Chat can add a Custom Endpoint. Agent extensions such as Cline and Kilo Code take an OpenAI-compatible provider. Continue adds ghost-text autocomplete. This guide connects each one to free models through FreeLLMAPI.

Which option to use

OptionChat and agentGhost-text autocompleteFreeLLMAPI endpoint
Copilot Chat with a Custom Endpoint (BYOK)YesNo. Copilot inline suggestions need a GitHub account and do not use BYOK models./v1/chat/completions or /v1/messages
Cline or Kilo CodeYes, agent with file edits and commandsNo/v1/chat/completions
ContinueYesYes/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 | bash

Open 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.

  1. Open the Chat view. In the model picker, select Manage Language Models. You can also run Chat: Manage Language Models from the Command Palette.
  2. Select Add Models, then Custom Endpoint.
  3. Enter a group name, a display name and the API key. For the key, enter your FreeLLMAPI unified key.
  4. Select the API type Chat Completions.
  5. VS Code opens chatLanguageModels.json. Enter the model details as in the example below. Save the file.
  6. 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 toolCalling to true. 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 URL http://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:3001

To 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:
      - autocomplete

Read 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.

Free models for VS Code agents: tool calling and 128K+ context
ModelFree onContextFree limits (best offer)ToolsVision
GLM 5.3UnoRouter1M1 req/min
1 req/min per model
YesNo
GLM 5.3 FlashNVIDIA NIM, UnoRouter1M40 req/min
40 RPM
YesYes
Gemini 3.8 FlashGoogle AI Studio1MRecurring provider quotaYesYes
Qwen3.8 Flash NextAMD Radeon Cloud262KRecurring daily account allowanceYesNo
Qwen3.8 FlashElectronHub1M$0.25/week shared recurring creditYesYes
Gemini 3.7 FlashGoogle AI Studio1M10 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
GPT-5.6 LunaElectronHub1M$0.25/week shared recurring creditYesYes
Dots3 Note PreviewKilo Gateway, OpenRouter512K20 req/min
50 req/day
50 req/day account-wide (1,000 after a $10 purchase)
YesYes
DeepSeek V4 FlashAMD Radeon Cloud, BazaarLink, ElectronHub1M10 req/min
50 req/day
Shared rate limit
YesNo
Qwen3.8 27BElectronHub, Groq, OVH AI Endpoints262K30 req/min
250 req/day
70,000 tokens/min
~6M
YesYes

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.

ProblemCauseFix
The model is not in the agent model pickertoolCalling is not trueSet "toolCalling": true in chatLanguageModels.json
No Custom Endpoint optionYour organization turned off the BYOK policyAsk your Copilot administrator, or use Cline or Continue
401 "Invalid API key"The key is not your FreeLLMAPI unified keyCopy the unified key again from the Keys page
No ghost text from your modelCopilot inline suggestions do not use BYOK modelsUse Continue for autocomplete
"All models rate-limited after N attempts"All keys are at their limitAdd keys from more providers, or wait for the cooldowns
Use every one of these through one key. FreeLLMAPI is an open-source, self-hosted router that puts all these free tiers behind a single OpenAI-compatible endpoint and fails over when one is rate-limited. Browse the catalog or go live.

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.

Sources

All guides · Browse all free models

Keep reading

All posts →
Guide

Best free LLM APIs 2026

Ten genuinely free LLM APIs worth using — ranked, with real limits.

Guide

Unlimited free AI tokens?

No free AI API is unlimited. The closest real thing: 10.1 billion free tokens a month behind one key.

Guide

How to get a free LLM API key

Get a working key in minutes — no credit card required.