For a year the pitch wrote itself: Kimi Code is the $19 terminal agent that does what Claude Code does for a fifth of the price. Then Kimi K3 shipped on July 16 at $3 input / $15 output per million tokens — the exact tier as Claude Sonnet. The 10x discount that made Kimi Code an easy "why not" was a story about the older K2, and the real question now isn't cheap versus expensive. It's which of two coding agents fits how you work.
What each one is
Both are terminal coding agents: a CLI that reads your repo, runs commands, edits files, and drives a model. Claude Code is Anthropic's official one, which you likely already know: a Node.js CLI (also in your IDE, Slack, and web) running Opus 4.8 or Sonnet 5, with a mature MCP/hooks/CLAUDE.md/subagents ecosystem.
Kimi Code is Moonshot's less familiar equivalent: an API, a VS Code extension, and a CLI, defaulting to Kimi's own K3 (1M context) or the cheaper K2.7 Code. Same stack as Claude Code — TypeScript, npm, Node.js — with sub-agents, planning mode, MCP, and VS Code/JetBrains/Zed support. The differences that matter are downstream: the models, their price, and where your code is processed.
Price, verified on July 23, 2026
Two ways to pay for either tool: per-token API, or a subscription. Every number below comes from the official pricing pages on July 23, 2026 — Moonshot's API pricing and Anthropic's pricing docs.
API pricing (per 1M tokens):
| Model | Input | Output | Cache read | Context |
|---|---|---|---|---|
| Kimi K2.7 Code | $0.95 | $4.00 | $0.19 | 256K |
| Kimi K3 | $3.00 | $15.00 | $0.30 | 1M |
| Claude Sonnet 5* | $3.00 | $15.00 | $0.20 | — |
| Claude Opus 4.8 | $5.00 | $25.00 | $0.50 | — |
*Sonnet 5 runs at an introductory $2/$10 through August 31, 2026, then $3/$15.
The pattern: Kimi's cheap advantage lives entirely in K2.7 Code, its coding-specialized model at $0.95/$4. Its flagship K3 matches Sonnet, and Claude's flagship Opus 4.8 sits above both. Two details change the real bill: Claude's Opus 4.7-and-later models use a newer tokenizer that produces roughly 30% more tokens for the same text (per Anthropic's pricing docs), and Moonshot has said Kimi and Kimi Code subscriptions will split into separate plans soon.
Subscriptions: Claude's Pro plan is $20/month (or $17 billed annually) and includes Claude Code; Max runs from $100/month (5x usage) to $200 (20x). Kimi bundles Kimi Code credits into its membership tiers — Andante ¥39, Moderato ¥79, Allegretto ¥159, Allegro ¥559 per month — with coding credits scaling 1x / 4x / 20x / 60x across those tiers. Where you buy also matters: an Anthropic-compatible gateway such as AIReiter resells Claude models below list, so the per-token figure depends on the vendor, not only the model.
I gave both the same coding task
Benchmarks are abstract, so I ran a small first-hand test. The prompt: write a Python expression evaluator supporting + - * /, parentheses, unary minus, and decimals — without eval(). It's a classic trap for operator precedence and associativity. I sent the identical prompt to Claude Opus 4.8 and Kimi K2.7 Code through one API endpoint, then ran each result against ten test cases.
Both passed 10/10. No correctness gap on this task — both handled the precedence traps and the unary-minus edge cases cleanly. The difference was speed and verbosity:
| Correctness | Latency | Output tokens | |
|---|---|---|---|
| Claude Opus 4.8 | 10/10 | 7.3s | 651 |
| Kimi K2.7 Code | 10/10 | 35.7s | 1,256 |
Claude was about 5x faster and returned roughly half the tokens for the same working answer. Kimi's solution was correct but chattier and slower. This is one prompt, not a benchmark — K3 wasn't callable on my endpoint, so this is the K2.7 Code model, which is what Kimi Code routes to on its lower tiers. Treat it as a single honest data point: on a task both can solve, latency and token economy still separate them.
Run Kimi inside Claude Code (2 lines)
You don't actually have to choose the harness. Claude Code reads two environment variables, so you can keep its interface and point it at Kimi's models, a setup plenty of developers search for by name.
export ANTHROPIC_BASE_URL=https://api.kimi.com/coding/
export ANTHROPIC_API_KEY=your_kimi_key
# then use model "k3" (or "k3[1m]" for the 1M window) and run:
claude
Run /status and if the base URL reads https://api.kimi.com/coding/, Kimi is now driving Claude Code — with your existing MCP servers, hooks, CLAUDE.md, and slash commands untouched. Moonshot documents this in its official Claude Code integration guide, and the same env-var trick is how you'd wire other third-party models into Claude Code.
This is the hybrid setup a growing share of developers describe on X: Claude Code's harness with Kimi's pricing when a task is large and cheap to burn through, Anthropic's models when reliability matters most.
Four things that decide it more than benchmarks
Before you commit, check these, they matter more than any single score:
- Where your code goes. Kimi's hosted API runs on servers in China. For personal projects that's a non-issue; for regulated or enterprise code it can be a hard blocker. Claude's data path is the more common enterprise fit.
- Self-hosting. Kimi K3 is expected to release open weights around July 27, so teams that need on-prem inference have a path Anthropic doesn't offer. If data residency is your constraint, this is the workaround.
- Ecosystem maturity. Claude Code has a longer head start in IDE integrations, third-party tooling, and production reliability. Kimi Code is newer and moving fast, but the surrounding community is smaller.
- Which model, not which logo. Because both harnesses can run either family's models, price and quality track the *model* you select far more than the CLI wrapping it.
So which should you run
For most developers, Claude Code is the safer default: the ecosystem is deeper, output is fast and terse, and the data path clears enterprise review. Reach for Kimi Code when cost per token is the deciding factor, when you need the 1M-context K3 on a large repo, or when open weights and self-hosting matter for compliance. Cost-sensitive but attached to Claude Code's interface? The hybrid setup above gets you both.
What no longer decides it is price alone. Pick on speed, context size, data residency, and ecosystem depth — the axes where these two genuinely differ.
FAQ
Can I use Kimi Code in Claude Code?
Yes. Set ANTHROPIC_BASE_URL to https://api.kimi.com/coding/ and ANTHROPIC_API_KEY to your Kimi key, then select model k3 (or k3[1m] for 1M context). Claude Code's interface, MCP servers, and hooks keep working unchanged.
Is Kimi Code cheaper than Claude Code?
Only with the K2.7 Code model ($0.95/$4 per 1M). Kimi's flagship K3 is $3/$15 — the same as Claude Sonnet — while Claude Opus 4.8 is $5/$25. The old "10x cheaper" claim was based on the older K2 model.
Which is better for large codebases?
Kimi K3 offers a 1M-token context window, useful for very large repos. Claude Code pairs a mature IDE/subagent workflow with strong models; for most projects that ecosystem matters more than raw context size.
What does Kimi Code run on?
Per Moonshot's docs, the Kimi Code CLI is written in TypeScript, installs via npm, and runs on Node.js — the same stack as Claude Code. Both also integrate with VS Code and JetBrains.
Is Kimi K3 open source?
Moonshot is expected to release K3's open weights around July 27, 2026, which enables self-hosting — something Anthropic's models don't offer.
