# Kilo Code Setup

> **Last verified**: 2026-09-18 · 📄 Per official docs (Kilo Code extension; documentation at kilo.ai)

> **⚠️ Ownership and UI changed**: on 2026-07-15 [Anaconda announced its acquisition of Kilo Code](https://www.anaconda.com/press/anaconda-acquires-kilo-code). Since then Kilo reworked the custom-endpoint entry: it is no longer Roo Code's "API Provider dropdown + tick Use custom base URL", but Settings → the **Providers** tab → the **Custom provider** dialog (stated verbatim on the official [anthropic](https://kilo.ai/docs/ai-providers/anthropic) and [openai-compatible](https://kilo.ai/docs/ai-providers/openai-compatible) pages). The steps below follow the new UI.

## At a glance

| Item | Details |
|---|---|
| Models you can use | Claude ✅ (**Provider API = Anthropic Messages**) · GPT ✅ · Chinese models ✅ (**Provider API = OpenAI Compatible**) · Gemini ❌ (no Gemini route documented on this page) |
| Protocol & Base URL | Anthropic: `https://api.qcode.cc/api` · OpenAI: `https://api.qcode.cc/openai/v1` |
| Where to configure | extension settings (gear) → **Providers** tab → scroll to the bottom → the **Custom provider** dialog |
| Official docs | [kilo.ai](https://kilo.ai) |

[Kilo Code](https://kilo.ai) is an open-source AI coding extension for VS Code. It is a fork of [Roo Code](/docs/ide/roo-code), which in turn forked from [Cline](/docs/ide/cline) — **same ancestry, diverged interfaces**: Kilo uses the Custom provider dialog in the Providers tab, while Roo Code and Cline still use an API Provider dropdown. Do not copy these steps into those two tools; read their own pages.

## Which protocol

| Models you want | Provider API | Base URL |
|---|---|---|
| Claude | `Anthropic Messages` | `https://api.qcode.cc/api` |
| GPT and the four Chinese families | `OpenAI Compatible` | `https://api.qcode.cc/openai/v1` |
| GPT / xAI in Responses style | `OpenAI Responses` | see [Endpoints and API formats](/docs/getting-started/endpoints-and-api-paths) |

🔴 **Never call Claude through OpenAI Compatible** — QCode's OpenAI endpoint rejects Claude models with
`model_not_available_on_endpoint`. The official docs likewise put Anthropic and MiniMax under
**Anthropic Messages**.
## Install

Search for **Kilo Code** in the VS Code marketplace, or follow the instructions on [kilo.ai](https://kilo.ai).

## Configure Claude (Custom provider)

1. Open Kilo Code's sidebar **Settings** (the gear icon) and go to the **Providers** tab
2. Scroll to the bottom and click **Custom provider**
3. Fill in the dialog:

   | Field | What to enter |
   |---|---|
   | **Provider ID** | a unique identifier, e.g. `qcode` |
   | **Display name** | the name shown in the UI, anything you like |
   | **Provider API** | choose **Anthropic Messages** for Claude |
   | **Base URL** | `https://api.qcode.cc/api` |
   | **API key** | your QCode key (starts with `cr_`) |
   | **Models** | type it in, or pick from the auto-fetched list (e.g. `claude-sonnet-5`) |
   | **Headers** | optional custom HTTP headers as key-value pairs |

4. Click **Submit**; the models appear in the model picker
5. Send a message in the chat to verify

> **Mainland China**: swap the host for `https://asia.qcode.cc/api` (Asia node, near Korea / Taiwan / Hong Kong); the key stays the same.
> The official Base URL examples are written in versioned form (something like
> `https://api.your-provider.com/v1`), and Kilo auto-fetches the model list from a valid URL. For the
> Anthropic Messages leg we suggest stopping at `/api` and letting the extension append `/v1/messages`.
> **No trailing slash.** Whether an extra slash actually produces a 404 we have **not tested**, so follow
> the suggested form. Whatever you set in the UI is stored in a config file (the official pages call it
> `kilo.json` in one place and `kilo.jsonc` in another) and can be edited directly.
## Configure GPT and Chinese models (OpenAI Compatible)

The same **Custom provider** dialog, only two fields change:

1. Set **Provider API** to **OpenAI Compatible**
2. **Base URL**: `https://api.qcode.cc/openai/v1`
3. **API key**: the same `cr_` key
4. **Models**: type `gpt-6-sol`, `gpt-5.6-terra`, or a [Chinese model id](/docs/usage/cn-models) such as `glm-5.2`

For the Responses-style interface of GPT / xAI the official value is **OpenAI Responses**; Anthropic models
still only work through Anthropic Messages (Base URL `https://api.qcode.cc/api`). The two legs are not interchangeable.
## Verify connectivity

Check the endpoint and key with curl first, so you know whether to debug the extension's UI:

```bash
KEY="cr_your_qcode_key"
curl -X POST https://api.qcode.cc/api/v1/messages \
  -H "x-api-key: $KEY" -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-sonnet-5","max_tokens":32,"messages":[{"role":"user","content":"ping"}]}'
```

JSON containing `content` means the endpoint side is fine; if the extension still fails, the problem is in its settings.

## Troubleshooting

| Symptom | Cause | Fix |
|---------|-------|-----|
| `model_not_available_on_endpoint` | Reaching Claude through OpenAI Compatible | Switch to the Anthropic provider with `/api` |
| `Invalid API key` | Wrong key or stray whitespace | Check the `cr_` prefix and trim spaces |
| 404 | Trailing slash on the base URL, or wrong path | Compare against the table above |
| Your model id is missing from the dropdown | Not in the extension's built-in list | Type it into the custom model id field |

## Related

- [Endpoints & API Paths](/docs/getting-started/endpoints-and-api-paths) — protocol × model-family table
- [Roo Code Setup](/docs/ide/roo-code) — upstream project, nearly identical setup
- [Cline Integration](/docs/ide/cline) — further upstream
- [Chinese Models](/docs/usage/cn-models)