Providers / Moonshot AI (Kimi)
Moonshot AI (Kimi)
Moonshot AI makes the Kimi models, a family of open-weight models aimed at coding and agent work. The current line is Kimi K3. The earlier K2 line includes a general model, K2.6, and a coding model, K2.7 Code. Recent Kimi models accept text, images and video.
Models
USD per 1M tokens · prices as of 2026-11-21
| Model | Best for | Input | Output | Context |
|---|---|---|---|---|
| Kimi K2.6 | General writing, analysis and chat · Screenshots or video in the prompt | $1.1515 | $4.7831 | 256K |
| Kimi K2.7 Code | A model trained for code · Screenshots or video in the prompt | $1.1515 | $4.7831 | 256K |
| Kimi K3 | Agent work over large codebases (read-heavy) · Long, write-heavy generations · Screenshots or video in the prompt | $3.2900 | $16.4498 | 256K |
Which model for which job
Kimi K3 takes text, images and video, supports parallel tool calls, and lets you switch reasoning off.
| Job | Use | Input / output per 1M | Why |
|---|---|---|---|
| Agent work over large codebases (read-heavy) | Kimi K3 | $3.2900 / $16.4498 | Input is cheap relative to output |
| Long, write-heavy generations | Kimi K3Another model, or K3 with reasoning off | $3.2900 / $16.4498 | K3 output is priced high |
| A model trained for code | Kimi K2.7 Code | $1.1515 / $4.7831 | Coding model built on K2.6; thinking is always on (older, deprecated) |
| General writing, analysis and chat | Kimi K2.6 | $1.1515 / $4.7831 | Thinking can be switched off; Moonshot recommends it over K2.7 Code for these (older, deprecated) |
| Screenshots or video in the prompt | Kimi K2.6Kimi K2.7 CodeKimi K3 | $1.1515 / $4.7831$1.1515 / $4.7831$3.2900 / $16.4498 | Image and video input |
Data handling
What Moonshot publishes
Moonshot’s own terms say its API is based in Singapore, does not train on prompts, and has zero retention.
What Yunshu does
Prompts aren’t stored by default. Batches are the one exception: batch inputs and results are kept for 7 days after the batch finishes, then deleted. An organisation can turn on zero retention, which refuses batches as well.
Pricing notes
- Output costs more than input. Reasoning tokens count as output, so switching reasoning off on simple steps saves money.
- Prompt caching. Moonshot caches repeated prompt prefixes automatically.
- Yunshu’s own cache. Exact repeats of a request are answered from our cache and not charged.
Use it in your coding tool
Paste these settings to use Kimi K2.6. Swap in any Moonshot AI model ID from the table above.
export ANTHROPIC_BASE_URL=https://api.yunshurouter.com
export ANTHROPIC_AUTH_TOKEN=YOUR_YUNSHU_KEY
export ANTHROPIC_MODEL=kimi-k2.6
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1OpenAI API Key: YOUR_YUNSHU_KEY
Override OpenAI Base URL: https://api.yunshurouter.com/v1
Add model: kimi-k2.6 (then Verify)model = "kimi-k2.6"
model_provider = "yunshu"
model_context_window = 262144
[model_providers.yunshu]
name = "Yunshu Router"
base_url = "https://api.yunshurouter.com/v1"
env_key = "YUNSHU_API_KEY"
wire_api = "responses"Base URL: https://api.yunshurouter.com/v1
API Key: YOUR_YUNSHU_KEY
Model ID: kimi-k2.6Run these in your shell before starting Claude Code, or put them in ~/.claude/settings.json (see the guide). No /v1 in the address: Claude Code adds it. The last line stops Claude Code sending fields only Anthropic models accept. Full guide →
In Cursor Settings → Models: paste the key under OpenAI, turn on the base URL override and keep the /v1. Then pick the model in the chat panel. Full guide →
Add this to ~/.codex/config.toml and set YUNSHU_API_KEY to your key. Codex sends the whole conversation each turn; we don't store responses. Full guide →
Set API Provider to OpenAI Compatible. Then set the context window and prices from the model page, so Cline's cost estimate matches your bill. Full guide →
Questions
How do I use Kimi K3 with Claude Code?
Point ANTHROPIC_BASE_URL at Yunshu’s Anthropic endpoint, use your Yunshu Router key as
ANTHROPIC_AUTH_TOKEN, and set ANTHROPIC_MODEL=kimi-k3. The
Claude Code guide has every step.
Can I use the Kimi API outside China?
Yes. A Yunshu Router key calls Kimi K3 in OpenAI or Anthropic format. You pay from a prepaid balance in USD, CNY or SGD, topped up by card.
What is the difference between Kimi K3, K2.7 Code and K2.6?
K3 is the current model. K2.7 Code and K2.6 are older, and Moonshot lists both as deprecated. K2.7 Code is a coding model built on K2.6, with thinking always on. Moonshot says it uses about 30% fewer thinking tokens than K2.6. With K2.6 you can turn thinking off, and Moonshot recommends it for general writing and analysis.
Does Moonshot store my prompts?
See Data handling.