Kimi Code offers Kimi K3 under two model IDs. k3 supports up to 1M (1048576) tokens on Pro or Allegretto plans and above, or 256K on Plus and Moderato. k3-256k caps context at 256K (262144) at about half the quota. Pick K3 with /model in Kimi Code CLI, the model picker in Kimi Code Desktop or the dropdown in Kimi Code for VS Code, set kimi-code/k3 in ~/.kimi-code/config.toml, or call both IDs over the API.

Kimi K3 models in Kimi Code: k3 vs k3-256k
Kimi Code is the programming service included in Kimi membership. It comes as a Desktop app, a CLI and a VS Code extension, and its API Keys work in third-party tools. It offers six model IDs, including K3, the 2.8T-parameter previous flagship, in two variants:
| Specification | k3 | k3-256k | k3.1-pro | k3.1-pro-highspeed | kimi-for-coding | kimi-for-coding-highspeed |
|---|---|---|---|---|---|---|
| Version and role | K3 (2.8T, previous flagship) | K3 (256K context) | K3.1 Pro (3T-class, latest flagship) | K3.1 Pro Highspeed | K2.8 Preview (close to K3, more efficient thinking) | K2.7 Code Highspeed |
| Context | Up to 1048576 | Up to 262144 | Up to 1048576 | Up to 1048576 | Up to 1048576 | Up to 262144 |
| Speed and quota | Regular (~2x k3-256k quota) | Regular | Regular | ~2-3x speed, ~2x quota | Regular | ~6x speed, ~3x quota |
| Effort | low, high, max (default high) | low, high, max (default high) | low, high, max (always thinking) | low, high, max (always thinking) | low, high, max (default max) | Thinking:ON (effort not adjustable) |
| New plans | Plus+ (1M: Pro+) | Plus+ | Plus+ (1M: Pro+) | Pro+ | Plus+ | Pro+ |
| Legacy plans | Moderato+ (1M: Allegretto+) | Moderato+ | Moderato+ (1M: Allegretto+) | Allegretto+ | Andante+ | Allegretto+ |
| Input | Image, video | Image only | Image, video | Image, video | Image, video | Image, video |
Key differences in daily work:
k3suits large codebase analysis, multi-file refactoring and long documents, with up to 1M context on Pro or Allegretto plans and above.k3-256ksuits everyday Q&A, code completion and single-file or small-file edits.k3-256kgives the same results ask3within 256K context, at about half the quota.k3-256kaccepts image input but not video.
New plans drop the 7-day limit, keeping the 5-hour window and monthly quota, while legacy plans refresh every 7 days. All clients and API Keys share one quota, shown by /usage.
Switch to Kimi K3 in official clients
Members can use Kimi K3 in Kimi Code Desktop, Kimi Code CLI and Kimi Code for VS Code without managing an API Key. Kimi Code Desktop runs on macOS (Apple Silicon and Intel), Windows and Linux (AppImage, DEB and RPM). JetBrains and Zed connect through the CLI's ACP protocol.
Kimi Code CLI runs on Node.js. Install it with the official script, which needs no Node.js installed first, or npm install -g @moonshot-ai/kimi-code on Node.js 22.19.0 or later:
# macOS / Linux
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash# Windows (PowerShell)
irm https://code.kimi.com/kimi-code/install.ps1 | iexRun kimi and then /login to connect your account. To select K3:
- Desktop: use the model picker inside the Composer.
- CLI: run
/model, or run/provider refreshor/logoutand/loginif K3 is missing. - VS Code: use the dropdown in the input bar.
- Missing in Desktop or VS Code: restart Desktop or sign in again, or restart VS Code or reinstall the extension.
From CLI v2.3.0 and Desktop v1.1.1, mid-session switches ask to start a new session, compact and continue, or continue directly. From CLI v2.5.0, /model and /effort work mid-turn for the next turn.
Context cache rules and switching between 1M and 256K
- Changing models or thinking effort mid-session invalidates the context cache, so the next request is prefilled again and uses more tokens.
- Reasoning chains from different models can affect each other, so start a new session when you switch.
- Switching to K3.1 Pro inside an existing K3 session degrades output quality and reduces cache hits.
- From 1M
k3tok3-256k: compact manually to within 256K first, though Kimi Code CLI and Claude Code can compact on their side. - If the conversation history includes video files, switching straight to
k3-256kfails because it does not accept video, so compact first. - From
k3-256kto 1Mk3: switching keeps the cache, so near 256K you can move tok3without compacting.
Configure Kimi K3 in ~/.kimi-code/config.toml
Kimi Code CLI creates ~/.kimi-code/config.toml on first run, beside tui.toml for terminal UI preferences, and KIMI_CODE_HOME relocates both. Field names use snake_case, and keys containing . must be quoted. Run /reload while idle to apply edits, and /status to check the active model.
Signing in with /login provisions a kimi-code/k3 entry under the managed:kimi-code provider. The docs' full example looks like this:
default_model = "kimi-code/k3"
default_permission_mode = "manual"
default_plan_mode = false
[providers."managed:kimi-code"]
type = "kimi"
base_url = "https://api.kimi.com/coding/v1"
api_key = ""
[models."kimi-code/k3"]
provider = "managed:kimi-code"
model = "k3"
max_context_size = 1048576
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
display_name = "K3"
support_efforts = [ "low", "high", "max" ]
default_effort = "max"
[thinking]
enabled = true
effort = "high"
keep = "all"This example sets default_effort = "max", while elsewhere the same page says the /login default for kimi-code/k3 is high.
| Table and field | Type and default | What it controls |
|---|---|---|
default_model | string (none) | Default CLI model alias matching a key in [models] |
[models."<alias>"].provider | string (required) | Key in [providers], for example "managed:kimi-code" |
[models."<alias>"].model | string (required) | Model ID sent to the API, for example "k3" |
[models."<alias>"].max_context_size | integer (required) | Max context tokens (1048576 for k3, minimum 1) |
[models."<alias>"].capabilities | array<string> | Tags such as "thinking", "always_thinking", "image_in", "video_in" and "tool_use" |
[models."<alias>"].support_efforts | array<string> | Allowed efforts ([ "low", "high", "max" ] for k3) |
[models."<alias>"].default_effort | string | Model default effort, which managed refreshes may rewrite |
[thinking].enabled | boolean (true) | Turns thinking on by default (false forces it off) |
[thinking].effort | string (none) | Global effort (low, medium, high, xhigh, max), falling back to the model default |
[thinking].keep | string ("all") | Preserved thinking passthrough, overridden by KIMI_MODEL_THINKING_KEEP |
Pinning model settings with overrides
- Put custom values under
[models."<alias>".overrides]so they survive provider refreshes, which may rewritesupport_effortsanddefault_effort. - Overrides accept
max_context_size,max_input_size,max_output_size,capabilities,display_name,reasoning_key,adaptive_thinking,support_efforts,default_effortandoff_effort. - Overrides do not accept
provider,model,protocol,beta_api,base_urlorupgrade. KIMI_MODEL_*environment variables create a temporary provider in memory that is gone after a restart.
For desktop alerts, Notification hooks, and NotifyUser, see Kimi Code notifications: hooks, NotifyUser and TUI settings.
Assign Kimi K3 and custom effort variants to subagents
Subagents use the caller's model unless [secondary_model] is set in ~/.kimi-code/config.toml. Run /secondary-model (alias /subagent-model) in the TUI to pick its default_model. New subagents use the change straight away, with no restart.
When the pool in [secondary_model.models] lists two or more aliases, the main agent gets a model parameter when it spawns a subagent. You can register a k3-max variant next to kimi-code/k3:
[models.k3-max]
provider = "managed:kimi-code"
model = "k3"
max_context_size = 1048576
capabilities = [ "thinking", "always_thinking", "image_in", "video_in", "tool_use" ]
support_efforts = [ "low", "high", "max" ]
[models.k3-max.overrides]
default_effort = "max"
[secondary_model]
default_model = "kimi-code/k3"
[secondary_model.models]
"kimi-code/k3" = "Default high effort. Good for most implementation, analysis, and multi-turn interaction tasks."
k3-max = "The same model at max thinking effort. Good for the hardest subtasks."Subagent variant rules:
- Under
managed:kimi-code, only thek3family currently declares effort levels. - A variant does not inherit fields, so copy
capabilities,support_effortsand other metadata in full. - The variant's
default_effortmust be one of itssupport_efforts. - For the main agent, the global
[thinking].effortoverrides the variant'sdefault_effort. - For subagents, the variant's
default_effortwins over[thinking].effort, and only[secondary_model].default_effortoutranks it. - A broken alias in
[secondary_model]makes session startup fail with an error that names the alias.
Use Kimi K3 in third-party tools over the Kimi Code API
Members can create up to 5 API Keys in the Kimi Code Console, and each key is shown only once. Use them in tools such as Claude Code, OpenCode and Codex. Kimi Code is a membership subscription with rate limits. The Kimi Platform (https://api.moonshot.cn/v1 or https://api.moonshot.ai/v1) is pay-as-you-go instead.
| Protocol | China Base URL | Overseas Base URL |
|---|---|---|
| OpenAI compatible (Responses and Chat Completions) | https://api.kimi.com/coding/v1 | https://api.kimi.ai/coding/v1 |
| Anthropic compatible | https://api.kimi.com/coding/ | https://api.kimi.ai/coding/ |
Some tools, such as Claude Code, need only the Base URL and add the rest of the path themselves. Others, such as Trae, need the full address, for example https://api.kimi.com/coding/v1/chat/completions or https://api.kimi.com/coding/v1/responses. Tools that support the Responses API should use the native Responses format.
Model IDs, User-Agent policy, and effort mapping
- Pass the exact model ID,
k3ork3-256k, because a display name or a typo silently falls back to K2.8 Preview without thinking. - Keep the tool's real
User-Agentheader, because changing it is a violation that may suspend membership benefits. - In Kimi Code CLI, providers do not read shell variables, so set
api_key,api_key_envorenvinconfig.toml.
| Third-party tool input | Resulting behaviour on k3 and k3-256k |
|---|---|
| No value | Model default (high) |
ultra, max, xhigh | Mapped to max |
high, medium | Mapped to high |
low, minimum, light | Mapped to low |
off, none, disabled | Served by K2.8 Preview without thinking (rejected on K3.1 Pro) |
| Any other value | Rejected with HTTP 400 |
Common K3 context and model errors:
- HTTP 403 on
k3: Plus and Moderato returnYour current plan supports only k3 up to 256K contextabove 256K, and lower tiers lackk3. - 256K cap on
k3-256k: exceeding 256K returnsk3-256k supports only 256K contextor HTTP 400Your request exceeded model token limit: 262144. - HTTP 400 on format or effort: unrecognised efforts or Claude Code's env-only
k3[1m]form in API calls return HTTP 400.
Watch Kimi Code sessions on a keypad or phone with Orbtile
Orbtile shows Kimi Code, Claude Code and Codex sessions on a Logitech MX Creative Keypad, or on an iPhone (iOS 17+) or Android phone (8.0+) with Orbtile Mobile. It runs on a computer with macOS 14.0 Sonoma or later on Apple silicon, or a Windows 11 PC (x64), with Kimi Code supported on both.
- With nothing installed, Orbtile reads Kimi Code session files in
~/.kimi-code, or%USERPROFILE%\.kimi-codeon Windows, overridden byKIMI_CODE_HOME. - Each key shows the session name, state and live text, and working Kimi Code sessions glow magenta.
- During
Starting, the key shows the model name when it is available. - Hold a session key for 0.6 seconds to open Focus mode, which shows the session name and model on key 1.
- In Focus mode, key 2 shows the subagent count and opens a view with one subagent on each of keys 1 to 8.
- Waiting sessions turn terracotta and move to the front, and a tap on key 9 focuses the first waiting session.
- A tap on a session key brings its terminal or Kimi window to the front.
- Optional Kimi Code hooks, chosen in Settings > Agents, add a Compacting state and never approve or deny anything.
To answer from the keypad on a Mac or a Windows PC, run the session in Kimi's own server with kimi web or kimi rc, or type /rc in a Kimi terminal session.
- Press Deny on key 7 to decline a permission request, or hold Allow on key 9 for 0.6 seconds to approve.
- Permission answers work for up to 2 minutes, or Kimi Code's shorter limit, before the key shows Answer on computer.
- For a question with listed options, pick options on keys 1, 2, 3 and 7, then hold Send on key 9.
- Kimi's server API is experimental: if a Kimi update changes it, keypad answers stop until Orbtile catches up, and sessions still show.
- Other Kimi Code sessions, other questions and written answers stay on your computer.
See Kimi Code web UI: kimi web, /web, tokens and LAN setup and Kimi Code vs Claude Code: run both and see which needs you.
FAQ
What is the difference between k3 and k3-256k in Kimi Code?
In Kimi Code, k3 is the 2.8T-parameter K3 model with up to 1M context on Pro or Allegretto plans and above, or 256K on Plus and Moderato. It accepts image and video input. The k3-256k model ID caps context at 262144 tokens, accepts images only, matches k3 within 256K and uses about half the quota.
How do I switch to Kimi K3 in Kimi Code CLI, Desktop and VS Code?
In Kimi Code CLI, run /model, or run /provider refresh or /logout and /login if K3 is missing. In Kimi Code Desktop, use the model picker inside the Composer. In Kimi Code for VS Code, use the dropdown in the input bar.
Why does switching from k3 to k3-256k fail or lose cache hits?
Switching models or thinking effort mid-session invalidates the context cache and triggers a new prefill. Compact to within 256K before moving from 1M k3 to k3-256k. Direct switches also fail when history includes video, because k3-256k accepts images only.
What happens if I mistype the k3 model ID or disable thinking in a third-party tool?
If you pass a display name such as K3 or mistype the model ID in a third-party tool, the Kimi Code API falls back to K2.8 Preview without thinking. Passing off, none or disabled as the thinking effort on K3 also sends the request to K2.8 Preview without thinking.