Kimi for coding: which Kimi to pick, plus Claude Code and Codex runs on a private API
The Morse teamPublished Facts checked 4 min read
Kimi is a strong family for coding: Moonshot's own tables put Kimi K3 at 88.3 on Terminal-Bench 2.1 and Kimi K2.6 at 80.2 on SWE-Bench Verified, and Morse's Claude Code and Codex guides start new users on Kimi K3.1 Pro. On December 3, 2026 we ran Kimi K3.1 Pro in both tools through Morse's private API, and each fixed a real bug in under half a minute.
This page covers which Kimi to pick for which coding job, the settings for Claude Code and Codex, what happened in our runs, and the uncensored option for security work.
Which Kimi should you code with?
Morse serves several Kimi models on one key, and they suit different jobs:
| Kimi K3.1 Pro | Kimi K3 | Kimi K2.6 | Kimi K2 0905 | |
|---|---|---|---|---|
| Model id | moonshotai/kimi-k3.1-pro | moonshotai/kimi-k3 | moonshotai/kimi-k2.6 | moonshotai/kimi-k2-0905 |
| Context | 1M tokens | 1M tokens | 256K tokens | 256K tokens |
| Reasoning effort | "none", "low", "high", or "max" | "none", "low", "high", or "max" | "none" or "high" | Doesn't reason |
| Price | $2 per million input tokens and $10 per million output tokens | $3 per million input tokens and $15 per million output tokens | $0.95 per million input tokens and $4 per million output tokens | $0.75 per million input tokens and $3.125 per million output tokens |
Read from Morse's catalog when this page was built.
- Kimi K3.1 Pro for most agent coding: it's the default in Morse's coding-tool guides, and it adds a TEE tier for code that must stay on attested hardware.
- Kimi K3 when a task needs a one-million-token window and deep reasoning.
- Kimi K2.6 for agent loops on a budget, with a 256K context.
- Kimi K2 0905 for fast, small edits: it answers without thinking first, and Morse's model page measured it at 157 tokens per second on December 1, 2026.
How good is Kimi at coding?
From Moonshot's own model cards:
| Model | Benchmark | Score |
|---|---|---|
| Kimi K3 | Terminal-Bench 2.1 | 88.3 |
| Kimi K3 | DeepSWE | 67.5 |
| Kimi K2.6 | SWE-Bench Verified | 80.2 |
| Kimi K2.6 | SWE-Bench Pro | 58.6 |
| Kimi K2.6 | LiveCodeBench v6 | 89.6 |
| Kimi K2 0905 | SWE-Bench Verified | 69.2 |
Sources: Moonshot's Kimi K3, Kimi K2.6, and Kimi K2 0905 cards.
Each generation moved coding forward: K2 0905 improved on the first K2, K2.6 on K2.5, and K3 on both. These are scores from Moonshot's own tests, so a run in your tools can differ.
How do you set up Claude Code with Kimi?
Set these in the shell you start Claude Code from, with your Morse key in MORSE_API_KEY:
export ANTHROPIC_BASE_URL=https://inference.trymorse.ai
export ANTHROPIC_AUTH_TOKEN="$MORSE_API_KEY"
export ANTHROPIC_MODEL=moonshotai/kimi-k3.1-pro
export ANTHROPIC_DEFAULT_OPUS_MODEL=moonshotai/kimi-k3.1-pro
export ANTHROPIC_DEFAULT_SONNET_MODEL=moonshotai/kimi-k3.1-pro
export ANTHROPIC_DEFAULT_HAIKU_MODEL=z-ai/glm-5.3-flash
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=32000
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000
claude
These are the settings from Morse's guide. The haiku line sends Claude Code's background work, such as naming a session, to the fast, low-priced GLM 5.3 Flash; set it to a Kimi id if you want only Kimi. The base URL has no /v1, because Claude Code adds /v1/messages itself. Morse's Claude Code guide has the full walkthrough.
How do you set up Codex with Kimi?
Add Morse as a provider in ~/.codex/config.toml, then run codex in your project:
model = "moonshotai/kimi-k3.1-pro"
model_provider = "morse"
web_search = "disabled"
model_context_window = 1048576
model_auto_compact_token_limit = 200000
[model_providers.morse]
name = "Morse"
base_url = "https://inference.trymorse.ai/v1"
env_key = "MORSE_API_KEY"
wire_api = "responses"
For Kimi K2.6, set model_context_window to its 262,144 tokens instead. Morse's Codex guide has the rest.
What happened when we ran it?
We gave both tools a one-file Python project with a SQL injection: find_user built its query by joining strings. The instruction was "Fix it with a parameterized query. Change nothing else."
| Tool | Model | Result | Time | Notes |
|---|---|---|---|---|
| Claude Code (2.1.333) | Kimi K3.1 Pro | Switched to a ? placeholder with a (name,) tuple | 11 s | 3 turns |
| Codex (0.172.0) | Kimi K3.1 Pro | The same fix | 24 s | About 15,200 tokens |
Both changed only the one line and said so. Kimi K3.1 Pro reasons before it answers by default, which adds a few seconds per turn; for quick edits, set a lower effort or switch to K2 0905.
Tips for coding with Kimi
- Match the effort to the job. Kimi K3.1 Pro takes "none", "low", "high", or "max". Low effort is enough for renames and one-line fixes; keep the higher settings for planning a change across many files.
- Keep the compaction limit below the window. A million tokens of context doesn't mean every turn should carry a million. Compacting near 200,000 tokens keeps turns fast and the bill steady.
- Test before you rely on it. Claude Code and Codex are built for their makers' models. Both worked with Kimi in our runs, but run a small task in your own repository first.
Is there an uncensored Kimi for security code?
Yes: Kimi K3.1 Pro Uncensored, an abliterated build, for cybersecurity and agent security work on code you own. It works in Claude Code with the same settings and its own id. It doesn't accept the parallel_tool_calls setting that Codex always sends, so in Codex use the stock model.
Where does your code go?
It runs in attested hardware enclaves, under zero-data-retention terms. Morse runs Kimi's open weights on its own providers, so your code doesn't reach Moonshot; what Moonshot's own app keeps is covered in is Kimi AI safe. Coding agents resend files every turn, and repeated input bills at $0.20 per million cached input tokens on K3.1 Pro. Get an API key and point either tool at it.
Common questions
Which Kimi model is best for coding?
On Morse, Kimi K3.1 Pro is the default in the Claude Code and Codex guides, and it fixed our test bug in both tools. Kimi K3 is a strong alternative with a long context, and Kimi K2 0905 is the fast option for small edits.
How good is Kimi K3 at coding?
Moonshot's card reports 88.3 on Terminal-Bench 2.1 and 67.5 on DeepSWE for Kimi K3, at its maximum reasoning effort.
Can I use Kimi in Claude Code?
Yes. Point ANTHROPIC_BASE_URL at Morse's API origin, put your Morse key in ANTHROPIC_AUTH_TOKEN, and set the model variables to a Kimi id such as moonshotai/kimi-k3.1-pro.
Can I use the uncensored Kimi for coding?
In Claude Code, yes. Kimi K3.1 Pro Uncensored works there for security work on your own code. It doesn't accept a setting Codex always sends, so use the stock model in Codex.