Skip to content

Use Kimi K3 with Claude Code

Claude Code doesn’t require a Claude model: it works with any backend that speaks the Anthropic Messages API. CheapestInference exposes Kimi K3 through an Anthropic-compatible endpoint, so you can run Claude Code on Moonshot’s flagship with unlimited usage during your reserved time blocks — a flat monthly fee instead of per-token billing.

  1. Subscribe to the Flagship Pool and copy your subscriber key (sk-...) from the dashboard. Flagship seats are limited — if the pool is full, join the waitlist.
  2. Export these variables in your shell (or put them in your shell profile):
Terminal window
export ANTHROPIC_BASE_URL="https://api.cheapestinference.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="sk-..." # your subscriber key
export ANTHROPIC_MODEL="kimi-k3"
export ANTHROPIC_SMALL_FAST_MODEL="kimi-k3"
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=256000 # Kimi K3's 256K window
  1. Start claude as usual. Every request now runs on Kimi K3.
  • Flagship-class coding: K3 is Moonshot’s strongest model — the closest open-weights experience to the frontier labs’ agents, and a natural fit for Claude Code’s plan-then-edit loops.
  • Flat price: flagship models elsewhere carry flagship per-token prices, and coding agents multiply them. During your time blocks there is no per-token meter — see Unlimited Subscriptions.
  • Thinking blocks: K3’s reasoning surfaces through standard Anthropic thinking content blocks, so Claude Code renders it natively. See Reasoning for toggling it.
  • 256K context: set CLAUDE_CODE_AUTO_COMPACT_WINDOW=256000 (as above) so Claude Code compacts the session before hitting the window instead of erroring mid-task.

Pin one project to K3 without touching your global shell profile with .claude/settings.json in the project:

{
"env": {
"ANTHROPIC_BASE_URL": "https://api.cheapestinference.com/anthropic",
"ANTHROPIC_AUTH_TOKEN": "sk-...",
"ANTHROPIC_MODEL": "kimi-k3",
"ANTHROPIC_SMALL_FAST_MODEL": "kimi-k3",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "256000"
}
}

Yes. Claude Code talks to any endpoint that implements the Anthropic Messages API. Point ANTHROPIC_BASE_URL at https://api.cheapestinference.com/anthropic, set ANTHROPIC_MODEL to kimi-k3, and Claude Code runs on K3 — tool calls, streaming and thinking blocks included. No plugin or proxy on your machine.

It’s Moonshot’s flagship and among the strongest open-weights models for agentic coding — long tool-use chains, big-picture refactors, and instruction following are its strengths. Per-token, flagship models are the expensive tier everywhere (see the LLM API pricing comparison); running K3 on a flat-rate block is what makes it viable as a daily driver.

What does it cost to run Claude Code on Kimi K3?

Section titled “What does it cost to run Claude Code on Kimi K3?”

A flat monthly subscription to the Flagship Pool — see current prices. Usage during your reserved time blocks is unlimited, so a heavy week costs the same as a light one. Seats are limited.

  • Your Flagship Pool subscription also covers Qwen3.8 Max with its 1M window and vision — switch models by changing ANTHROPIC_MODEL, no new key needed.
  • Not ready for flagship? The same setup works with GLM 5.2 (Frontier Pool) or DeepSeek V4 Flash (Core Pool).
  • General setup, model table and troubleshooting: the main Claude Code guide.