The free tier is closed for most users.Thank you for every chat along the way. Paid models work as before, and your account, API keys, and balance stay as they are.Read why

VS Code Copilot API: Add FreeTheAI Models (BYOK)

VS Code chat adds FreeTheAI through its Custom Endpoint provider (bring your own key). It works even without a Copilot plan.

WebsiteAPI reference

Steps

  1. Open the language models

    In the chat model picker, press the gear (Manage Language Models), or run Chat: Manage Language Models.

  2. Add a Custom Endpoint

    Press Add Models, choose Custom Endpoint, enter a group name (FreeTheAI) and your key, and choose Chat Completions.

  3. Describe the models

    VS Code opens chatLanguageModels.json. Fill in the models and save:

    json
    [
      {
        "name": "FreeTheAI",
        "vendor": "customendpoint",
        "apiKey": "ftai_your_key_here",
        "apiType": "chat-completions",
        "models": [
          {
            "id": "glm-5.3",
            "name": "GLM 5.3",
            "url": "https://api.freetheai.org/v1/chat/completions",
            "toolCalling": true,
            "vision": false,
            "maxInputTokens": 200000,
            "maxOutputTokens": 32000
          }
        ]
      }
    ]
  4. Pick the model

    Choose GLM 5.3 in the chat model picker. Restart VS Code if it does not show up.

How this guide was checked: Checked against the VS Code language models docs (Custom Endpoint provider) on 2026-09-29.

Tips

  • If VS Code already wrote an apiKey value (a reference to its secret storage), keep that line instead of pasting your key.
  • Without a GitHub sign-in, set chat.utilityModel and chat.utilitySmallModel to a FreeTheAI model so titles and commit messages work.
  • Bring your own key covers chat and agent mode, not inline code completions.

Troubleshooting

I used the old "OpenAI Compatible" provider. Does it still work?

It is deprecated. Add FreeTheAI again with the Custom Endpoint provider and the chat-completions API type.

Why do I get a 401 "invalid API key" error?

The key is wrong or incomplete. Remove the FreeTheAI group, add it again, and paste the whole ftai_ key (53 characters).

The model does not show in the picker. What now?

Save chatLanguageModels.json and restart VS Code.

Agent mode does nothing with FreeTheAI. Why?

Keep "toolCalling": true and use a model that supports tools, such as glm-5.3 or kimi-k3.1-pro.

Why do I get a 403 error?

A 403 usually means the account follows no provider of that model, or your email is not confirmed. Follow a provider on freetheai.org/providers, then try again.

Common errors

  • 401: the key is wrong or incomplete. Paste the whole key.
  • 403: follow a provider of the model, or confirm your email.
  • 404: the model ID or URL is wrong.
  • 429: daily limit reached, or too many requests at once.

More guides: Coding tools

All setup guides

Did this guide work for you?