Kilo Code setup

Add one custom provider in Kilo Code, fill five fields, and code with TokenMilo’s Claude and GPT.

Updated 2026-11-16

1. Get an API key

Sign up in the TokenMilo console, top up and create a key under API Keys.

2. Add the provider in the UI

Open Settings → Providers → Custom provider and fill in:

FieldClaudeGPT
Provider IDtokenmilotokenmilo-gpt
Provider APIAnthropic MessagesOpenAI Compatible
Base URLhttps://api.tokenmilo.com/v1 (with /v1)https://api.tokenmilo.com/v1
API keysk-your-keysk-your-key
Modelsclaude-sonnet-5-5, claude-opus-5-5gpt-6.1-sol

3. Or edit the config file

// ~/.config/kilo/kilo.jsonc
{
  "provider": {
    "tokenmilo": {
      "name": "TokenMilo",
      "npm": "@ai-sdk/anthropic",
      "options": { "baseURL": "https://api.tokenmilo.com/v1", "apiKey": "{env:TOKENMILO_API_KEY}" },
      "models": {
        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5", "limit": { "context": 200000, "output": 32000 } },
        "claude-opus-5-5": { "name": "Claude Opus 5.5", "limit": { "context": 200000, "output": 32000 } }
      }
    }
  }
}

Set the TOKENMILO_API_KEY environment variable ({env:...} only works in the global config).

4. Check it works

Run a small task, then check Usage Logs in the console. Model IDs are in the model list.

FAQ

Why does the Anthropic base URL need /v1 here?

Kilo Code is built on OpenCode, whose Anthropic client only appends /messages — so use https://api.tokenmilo.com/v1, unlike Claude Code or Cline.

Anthropic Messages or OpenAI Compatible?

For Claude choose Anthropic Messages (prompt caching is automatic for model IDs containing "claude"). For GPT choose OpenAI Compatible with https://api.tokenmilo.com/v1.

Should I set the context window?

Yes — otherwise conversations may be cut at a small default. Use 200000 context and 32000 output for Claude.

Related guides

Need an API key?

Sign up at TokenMilo, top up, and create a key in the console in under a minute.

Get API key See all models