Use Kimi K3 in Claude Code and Codex: setup and tested configs
How to run Kimi K3 as the model in Claude Code and OpenAI Codex CLI through SeedRouter: the environment variables, the config.toml and test results.
Read as MarkdownKimi K3 works as the model in Claude Code and in OpenAI's Codex CLI. Claude Code talks the Anthropic Messages format and Codex talks the Responses format, and SeedRouter serves Kimi K3 in both. Set a base URL and a SeedRouter key, pick kimi-k3, and each request is billed per token from your balance. In our test runs on September 28, 2026, both tools created a file, ran it and reported the output, with Kimi K3 doing the work.
How do I use Kimi K3 in Claude Code?
Point Claude Code at SeedRouter with two environment variables, then choose the model:
export ANTHROPIC_BASE_URL=https://api.seedrouter.ai
export ANTHROPIC_API_KEY=sk-your-seedrouter-key
claude --model kimi-k3Claude Code also calls a smaller model in the background for some tasks. Point those at Kimi K3 too, so every request goes to a model your key can call:
export ANTHROPIC_DEFAULT_OPUS_MODEL=kimi-k3
export ANTHROPIC_DEFAULT_SONNET_MODEL=kimi-k3
export ANTHROPIC_DEFAULT_HAIKU_MODEL=kimi-k3To keep the setup across sessions, put the same variables in the env block of ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.seedrouter.ai",
"ANTHROPIC_API_KEY": "sk-your-seedrouter-key",
"ANTHROPIC_MODEL": "kimi-k3",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k3",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k3"
}
}Claude Code notes that kimi-k3 is not one of its own model names. That is a notice, not an error: the session runs. Kimi K3's reasoning shows up as thinking blocks, as it does with Claude models.
How do I use Kimi K3 in Codex?
Add SeedRouter to ~/.codex/config.toml:
model = "kimi-k3"
model_provider = "seedrouter"
model_context_window = 1048576
[model_providers.seedrouter]
name = "SeedRouter"
base_url = "https://api.seedrouter.ai/v1"
env_key = "SEEDROUTER_API_KEY"
wire_api = "responses"Then export the key and start Codex:
export SEEDROUTER_API_KEY=sk-your-seedrouter-key
codexwire_api = "responses" makes Codex use the Responses API, which is what Kimi's own Codex guide uses too. model_context_window tells Codex that Kimi K3 reads up to 1,048,576 tokens.
What did we test?
We gave Claude Code a two-step task (create a small Python file, run it and report the output) and Codex a four-step one (create the file, run it, change it, run it again and report both outputs).
| Tool | Format | Result |
|---|---|---|
| Claude Code | Anthropic Messages | File created and run; output reported correctly |
| Codex CLI | Responses | Two edits and two runs; both outputs reported correctly |
In Codex, Kimi K3 edited the file with Codex's patch tool and ran it with the shell tool across several turns. Its reasoning was carried from one turn to the next, which Kimi K3 needs in tool-call conversations.
Which reasoning effort should a coding agent use?
Kimi K3 defaults to max. For an agent that runs many steps, that is the slowest and most expensive setting. high suits most coding work, and low suits quick, mechanical steps. In Codex, set it with model_reasoning_effort in config.toml:
model_reasoning_effort = "high"Agents re-read the same files on every turn, so most of their input is served from the cache at a tenth of the input rate. Output, including reasoning, is where the cost of an agent session goes.
Can I use Kimi K3 in other coding tools?
Any tool that lets you set an OpenAI-compatible base URL and a model name can call Kimi K3 the same way: base URL https://api.seedrouter.ai/v1, your SeedRouter key, model kimi-k3. We have tested Claude Code and Codex; check your tool's docs for where it takes a custom base URL.
Frequently asked questions
Do I need a Claude or ChatGPT subscription for this?
No. With a SeedRouter key, Claude Code and Codex send their requests to SeedRouter, and you pay per token from your SeedRouter balance.
Does Kimi K3 support tool use in these agents?
Yes. Both tools rely on tool calls to read, edit and run files, and Kimi K3 handled them in our tests.
Can I send screenshots to Kimi K3 from an agent?
Kimi K3 reads images, but only as base64 data. Agents that attach screenshots as files encode them for you; a public image URL is not accepted.
How much does an agent session cost?
It depends on the task. The Kimi K3 pricing guide has the live rates, and the Kimi K3 page shows them next to the list price.



