---
title: "Kilo Code API: Add FreeTheAI as a Custom Provider"
description: "Use AI models in the Kilo Code VS Code extension and CLI with FreeTheAI as an OpenAI Compatible custom provider."
url: https://freetheai.org/setup/kilo-code
language: en
updated: 2026-09-29
---

# Kilo Code API: Add FreeTheAI as a Custom Provider

Kilo Code adds FreeTheAI as a custom provider with the OpenAI Compatible API and fetches the model list automatically.

## Settings

- Provider ID: `freetheai`
- Display name: `FreeTheAI`
- Provider API: `OpenAI Compatible`
- Base URL: `https://api.freetheai.org/v1`
- API key: `your FreeTheAI key (ftai_..., 53 characters)`

## Steps

1. **Open the providers.** In VS Code, open Kilo Code's Settings (gear) and go to the Providers tab.
2. **Add a custom provider.** Scroll to the bottom, press Custom provider, and fill in the values above.
3. **Pick models and submit.** Select models from the fetched list (or add IDs by hand) and press Submit. They appear in the model picker.

## Tips

- For the Kilo CLI, add the same provider to ~/.config/kilo/kilo.json with npm @ai-sdk/openai-compatible, as in the OpenCode guide.

## Troubleshooting

**Kilo Code shows "unknown API route" (404). What is wrong?**

The Base URL must be exactly https://api.freetheai.org/v1, without /chat/completions, and the provider API must be OpenAI Compatible.

**The API key box looks shorter after I paste my key. Is that a problem?**

No. Kilo Code hides the key once it is saved. If requests fail with 401, paste the full ftai_ key (53 characters) again.

**Do I need a Kilo account?**

No. A custom provider works without signing in to Kilo.

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

**Kilo Code is stuck on "considering next steps". What should I do?**

The model is busy. Switch to another model, and check freetheai.org/status.

Checked: Checked against Kilo Code's docs (OpenAI compatible providers) on 2026-09-29.
