Use MagmaRouter in Kilo Code

Kilo Code, a descendant of Roo and Cline, lets you add a custom OpenAI Compatible provider and will auto-fetch the model list from the gateway's /v1/models.
- Base URL
- https://api.magmarouter.com/v1
- API key
- Get one, starts sk-mr-
- Example model
- glm-5.3-xploded
Add a custom provider
In Settings, open the Providers tab, click Custom provider and fill in:
- Provider API: OpenAI Compatible
- Base URL: https://api.magmarouter.com/v1
- API key: your key
Kilo queries https://api.magmarouter.com/v1/models and offers a searchable model picker, so you rarely type an id by hand. For the CLI, define the provider in kilo.json:
JSON
{
"provider": {
"magmarouter": {
"npm": "@ai-sdk/openai-compatible",
"options": {
"baseURL": "https://api.magmarouter.com/v1",
"apiKey": "{env:MAGMAROUTER_API_KEY}"
},
"models": {
"glm-5.3-xploded": {
"name": "GLM 5.3 Flash Xploded",
"limit": { "context": 1048576, "output": 8192 }
}
}
}
},
"model": "magmarouter/glm-5.3-xploded"
}For agentic editing, pick a tool-capable model; the limits shape how Kilo manages context.
Pick a model
Each page has the Kilo Code setup with that model's id and limits filled in, and what a session costs.
GLM 5.3 Xploded in Kilo Code1M context, $2.00 in / $5.00 out per 1M
GLM 5.3 Flash Xploded in Kilo Code1M context, $0.30 in / $1.00 out per 1M
DeepSeek V4.1 Flash 1017 Xploded in Kilo Code1M context, $1.25 in / $2.50 out per 1M
DeepSeek Flash Lite Xploded in Kilo Code512K context, $0.36 in / $1.44 out per 1M
MiMo V2.6 Flash Xploded in Kilo Code1M context, $1.00 in / $2.00 out per 1M
Qwen3.8 27B Xploded in Kilo Code1M context, $1.50 in / $5.00 out per 1M
Qwen3.8 27B Ultrafast Xploded in Kilo Code524K context, $1.75 in / $5.50 out per 1M