Moonshot Kimi provider for Claude Code
Agentic coding with strong tool-use and reasoning
claude-multi add kimi Use cases
Kimi K2.7 Code is Moonshot AI’s coding-focused model. K2.6 and K2.5 fill out the sonnet and haiku tiers at lower price points. All three handle multi-step tool use well, which is what Claude Code spends most of its time doing. The Anthropic-compatible endpoint at moonshot.ai plugs into Claude Code directly.
Model specs
| Role | Model | Context | Max output |
|---|---|---|---|
| Opus | Kimi K2.7 Code | 256K | 65,536 |
| Sonnet | Kimi K2.6 | 256K | 65,536 |
| Haiku | Kimi K2.5 | 256K | 65,536 |
K2.7 Code maps to opus for heavy reasoning. K2.6 maps to sonnet for balanced tasks. K2.5 maps to haiku for fast operations. All three have 256K context and 65,536 max output.
Thinking mode is on by default with REASONING_EFFORT: high and 16,000 thinking tokens. Auto-compaction targets the 256K context window. Without these settings, Claude Code assumes a 200K window for unrecognized models and never compacts, which leads to context overflow crashes. K2.7 Code also forces preserve_thinking mode, which keeps full reasoning content across multi-turn interactions.
Setup
- Create an account at moonshot.ai and generate an API key
- Run the setup command:
claude-multi add kimi- Paste your API key when prompted
The template sets the base URL, model mapping, thinking parameters, context limits, and compaction thresholds.
When to pick Kimi
Kimi works well for interactive, tool-heavy workflows. If you spend most of your Claude Code time reading files, running commands, and editing code in sequence, K2.7 Code handles that loop well. K2.6 and K2.5 cost less for tasks that do not need the strongest model.
The 256K context window covers most day-to-day development. If you regularly work with codebases larger than 200K tokens, DeepSeek or MiniMax offer 1M windows.
Kimi is pay-per-token only. There is no subscription plan. If you prefer a flat monthly rate, GLM offers a coding plan subscription.
Pricing details
K2.7 Code costs $0.95/MTok input (cache miss), $0.19/MTok input (cache hit), $4.00/MTok output. Check moonshot.ai for current pricing on all tiers.
For benchmark comparisons between K2.7 Code, GPT-5.5, and Opus 4.8, see the Kimi K2.7 Code announcement post.
Related providers
Pay-per-token via moonshot.ai