All providers
kimi

Moonshot Kimi provider for Claude Code

Agentic coding with strong tool-use and reasoning

Quick start claude-multi add kimi

Use cases

Agentic coding with complex tool chains
Multi-step debugging and investigation
Interactive pair programming
API integration and glue code

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

RoleModelContextMax output
OpusKimi K2.7 Code256K65,536
SonnetKimi K2.6256K65,536
HaikuKimi K2.5256K65,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

  1. Create an account at moonshot.ai and generate an API key
  2. Run the setup command:
Terminal window
claude-multi add kimi
  1. 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.

  • DeepSeek for 1M context, also pay-per-token
  • MiMo for lower cost per token, 1M context
  • GLM for a subscription alternative
Pricing

Pay-per-token via moonshot.ai