Guide · Other models in Claude Code
How do you use Kimi K3 in Claude Code?
Set ANTHROPIC_BASE_URL to an endpoint that serves Kimi in Anthropic's API format,
give it a Kimi key, and name a Kimi model in every model slot. Moonshot's API serves Kimi K3 on
an API key. A Kimi Code membership serves Kimi K3.1 Pro at its own endpoint. For a team, an
owner connects the company's OpenRouter key or Ollama Cloud plan in Selan once. Each developer
then runs selan claude --model openrouter:moonshotai/kimi-k3.
Why does Kimi K3 work in Claude Code at all?
Claude Code sends every request in Anthropic's Messages format. It reaches another server
when ANTHROPIC_BASE_URL is set to that server's address.
Moonshot AI serves Kimi K3 in that same format, at https://api.moonshot.ai/anthropic.
OpenRouter and Ollama Cloud answer in it too.
So unlike GPT, Kimi K3 needs no translation in the middle. What it needs is the right model names, the right window and a key. How GPT differs is in running GPT in Claude Code.
How do you set up Kimi in Claude Code by hand?
Moonshot's own guide puts ten variables in the env block of
~/.claude/settings.json:
- the base URL above, and your Moonshot API key as
ANTHROPIC_AUTH_TOKEN kimi-k3[1m]as the main model, and as the Opus, Sonnet, Haiku, Fable and subagent modelCLAUDE_CODE_AUTO_COMPACT_WINDOWat1000000, and the effort level atmax
Moonshot warns that subagent work fails or degrades noticeably without the subagent variable. It also warns that the file now holds your API key in plain text, so keep it out of git.
A Kimi Code membership has a setup of its own, on Kimi Code's Claude Code page. The base URL
is https://api.kimi.ai/coding/, and the membership's key goes in
ANTHROPIC_API_KEY, not the auth token. Every model slot names
k3.1-pro. Kimi K3.1 Pro answers only with thinking on.
Either setup works for one person. On a team, it is one Moonshot or Kimi Code key and one settings file per laptop, and no shared view of what Kimi costs. Why a key on every laptop is the expensive part is in keeping API keys off laptops.
How do you run Kimi K3 in Claude Code through Selan?
An owner connects an OpenRouter key or an Ollama Cloud plan in Selan. Kimi K3 is a model Selan lists, so an owner also switches it on at OpenRouter under Settings → Models.
Developers install the selan CLI, sign in as themselves and name the model:
selan claude --model openrouter:moonshotai/kimi-k3
The part before the first colon is the provider. Everything after it is that provider's own model id, passed through as it is.
With --model, Selan tells Claude Code the model's real context window. Selan
lists Kimi K3's window as 1,048,576 tokens, so a session compacts there and not at 200K. If an
owner set a lower context limit for your company, it compacts at that instead.
Kimi K3 starts at max effort, the level Moonshot recommends. Selan offers
low, high and max for it. If an owner has set a lower
Max effort for Moonshot, it starts at the highest level left under that
ceiling, and a request for more is lowered.
To skip the flag, an owner adds Kimi K3 to Claude Code's picker under
Settings → Model pickers. It then
appears in /model. The details are in Run any model.
Which account does a Kimi turn run on?
| Route | How it bills | Name it as |
|---|---|---|
| An OpenRouter key | Per token, on your OpenRouter invoice | openrouter:moonshotai/kimi-k3 |
| An Ollama Cloud plan | Your Ollama plan's monthly usage, then any credits you bought | ollama: and the Kimi id Ollama lists |
A Kimi turn runs on the provider its name points at, and on no other.
If that account is out of quota, the request fails rather than moving to the other one.
Through Selan, a Kimi Code membership runs Kimi K3.1 Pro, not K3. Connect it on the
Tokens page by signing in on Kimi's own page, then name it as kimi:k3.1-pro.
Its rolling usage windows ration it.
Ollama answers only when you name one of its models. A request that names no model never lands on it. How Ollama itself runs in Claude Code is in using Ollama with Claude Code. All of this is on Providers and models. When OpenRouter alone is the simpler answer is in OpenRouter and Selan compared.
What does a team get beyond the model?
- One usage record. Kimi turns land beside Claude turns, per person and per repository. Usage per developer shows what an owner sees.
- One spend limit. An OpenRouter turn is metered, so it counts against a member's limit. A turn on an Ollama plan does not. See spend limits.
- No Moonshot or OpenRouter key on a laptop. Keys stay on the gateway. A developer holds a Selan session you can revoke.
-
Codex on the same accounts.
selan codex --model openrouter:moonshotai/kimi-k3uses the same route. See Codex.
What should you check before switching a team to Kimi K3?
-
Effort and spend. Kimi K3 thinks before it answers, and Selan starts it
at
maxunless an owner has set a lower Max effort for Moonshot. On OpenRouter, the thinking is metered too. - The model must be switched on. A model your company cannot use is refused before Claude Code starts, not at the first request.
Free for up to three seats, and the Free plan needs no card.
The short version
- Kimi K3 is served in Anthropic's API format, so Claude Code reaches it with no translation.
- By hand, that is a settings file and a Moonshot or Kimi Code key on every laptop.
- Through Selan, a developer runs
selan claude --model openrouter:moonshotai/kimi-k3, at Kimi K3's own window. - Kimi K3 runs on your OpenRouter key or Ollama Cloud plan, with one usage record and no key on a laptop.
The manual setup is Moonshot AI's guide to using Kimi in Claude Code, re-read on 29 November 2026, and Kimi Code's Claude Code page, read the same day. Anthropic's position is its LLM gateway docs as read on 18 October 2026. What Selan does is its model list, its CLI and its providers, Codex and getting-started docs as they stood on the same day. The Kimi Code membership is as the providers docs describe it on 30 October 2026.