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:
| Field | Claude | GPT |
|---|---|---|
| Provider ID | tokenmilo | tokenmilo-gpt |
| Provider API | Anthropic Messages | OpenAI Compatible |
| Base URL | https://api.tokenmilo.com/v1 (with /v1) | https://api.tokenmilo.com/v1 |
| API key | sk-your-key | sk-your-key |
| Models | claude-sonnet-5-5, claude-opus-5-5 | gpt-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
- Cursor setup — Add Claude and GPT models to Cursor with your own key.
- Cline setup (VS Code) — Configure the Cline coding agent with Claude via TokenMilo.
- Roo Code setup (VS Code) — Use Claude 5.x and GPT-6 in Roo Code via the OpenAI Compatible provider.
- Continue setup (VS Code & JetBrains) — Configure Claude and GPT in Continue’s config.yaml.
- Trae custom model setup — Add Claude and GPT to the Trae IDE as custom models.
- Zed setup — Use TokenMilo models in the Zed editor’s agent panel.
Need an API key?
Sign up at TokenMilo, top up, and create a key in the console in under a minute.