Original guide review: October 12, 2026. Desktop platform and provider clarification: October 16, 2026.
Kimi Code is Moonshot AI’s developer-focused AI coding service. It is available through Kimi Code Desktop, Kimi Code CLI, the Kimi Code VS Code extension, and supported third-party coding tools through Kimi Code API keys. It can read code, edit files, run commands, search project files, use the web, and help with tasks such as debugging, refactoring, tests, documentation, and multi-file changes.
The most important distinction is this: Kimi Code is not the same as Kimi Platform API. Access to the official Kimi Code model service is tied to Kimi membership benefits and quota rules; the Desktop application can also connect to a separately configured model provider. Kimi Platform API is a separate pay-as-you-go developer platform for product integrations and application calls. If you mix their API keys, Base URLs, or billing models, login and model errors are likely.
What is Kimi Code?
Kimi Code is an AI coding agent built for developer workflows. In the official clients, you can open a local project, ask questions about the codebase, request a plan, approve file edits, run tests, inspect diffs, and continue the session until the work is verified.
Use it when you want an agent to work inside a repository, not just answer a coding question in a normal chat. It is especially useful for repo exploration, multi-file edits, test generation, migration tasks, bug diagnosis, and project documentation.
Kimi Code clients at a glance
Kimi Code is not just one interface. Choose the client based on how you work.
The official Desktop download guidance lists separate Apple silicon and Intel Mac builds, a Windows installer, and AppImage, DEB, and RPM packages for x86_64 Linux. These are Kimi Code Desktop packages; they do not establish a general Linux version of Kimi Chat or Kimi Work.
| Client | Best for | How it works | Main caveat |
|---|---|---|---|
| Kimi Code Desktop | Developers who prefer a graphical workspace | Open a local folder, chat with the agent, review changes, use the built-in terminal and browser | Official desktop builds are available for macOS, Windows, and x86_64 Linux (AppImage, DEB, or RPM) |
| Kimi Code CLI | Terminal-first developers, automation, remote servers, scripted workflows | Run kimi in a project directory and work through an interactive terminal UI | On Windows, Git for Windows is required before first launch |
| Kimi Code for VS Code | Developers who want an AI agent inside the editor | Use a sidebar chat, reference files/folders with @, review diffs, and approve changes | Requires an open workspace folder |
| Third-party tools | Users of Claude Code, OpenCode, Codex, and compatible agent tools | Create a Kimi Code API key and configure the correct Base URL, protocol, and model ID | Kimi Code keys and Kimi Platform API keys are not interchangeable |
Kimi Code vs Kimi Platform API
This is the most common source of confusion. The official Kimi Code model service has its own membership-based coding platform and endpoints; the Kimi Code column below describes that service. Kimi Platform API is the separate Moonshot/Kimi API platform for developers building applications.
To use another model inside Desktop, follow the official Desktop setup guide: open Settings → Model Providers, add that provider’s API key, base URL, and model details, then select it for the session. Its billing, limits, and data terms are separate from the official Kimi model-service quota. Connecting another provider inside Desktop is different from using a Kimi Code API key inside a third-party coding client. Neither route makes inference automatically free.
| Comparison | Kimi Code | Kimi Platform API |
|---|---|---|
| Primary use | Terminal, IDE, and agentic programming workflows | Product integrations, backend calls, apps, and enterprise API usage |
| Billing model | Kimi membership subscription with quota and rate limits | Pay-as-you-go API usage |
| Authentication source | Kimi account login or Kimi Code Console API key | Kimi Platform API key |
| Overseas OpenAI-compatible Base URL | https://api.kimi.ai/coding/v1 | https://api.moonshot.ai/v1 |
| Overseas Anthropic-compatible Base URL | https://api.kimi.ai/coding/ | Not the same as Kimi Code’s coding endpoint |
| Best choice when | You want a coding agent in Desktop, CLI, VS Code, or third-party coding tools | You are building an app or service that calls Kimi models programmatically |
If you see authentication errors, empty model lists, or “model not found” messages, first check that your API key and Base URL come from the same platform.
How to install Kimi Code CLI
Before running any install command from the web, open the official Kimi Code CLI documentation yourself and verify the command is still current. The official install script is the recommended route because it does not require pre-installed Node.js. The npm route is also available if you prefer package-manager installation.
macOS and Linux install script
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
Windows PowerShell install script
irm https://code.kimi.com/kimi-code/install.ps1 | iex
On Windows, install Git for Windows before first launch. Kimi Code CLI uses the bundled Git Bash shell environment. If Git Bash is installed in a custom location, set KIMI_SHELL_PATH to the absolute path of bash.exe.
npm or pnpm install
The npm method requires Node.js 22.19.0 or later.
node --version
npm install -g @moonshot-ai/kimi-code
With pnpm:
pnpm add -g @moonshot-ai/kimi-code
First launch
Move into your project folder and start the terminal UI:
cd your-project
kimi
For a one-off instruction without opening the full interactive UI, use -p:
kimi -p "Take a look at this project's directory structure"
On first launch, run /login. The CLI supports Kimi Code OAuth login and Kimi Platform API key mode. For normal Kimi Code membership benefits, use the Kimi Code login flow. For pay-as-you-go platform usage, use the correct Kimi Platform API key and Base URL.
How to use Kimi Code Desktop
Kimi Code Desktop is best if you want the agent workflow in a graphical app. It lets you open a local project, manage sessions, inspect changes, preview files, run commands in the built-in terminal, and review results without living entirely in the terminal.
- Download the desktop installer for your system from the official Kimi Code page.
- Install and open the app.
- Sign in with your Kimi account. The sign-in site depends on your region:
kimi.comfor mainland China andkimi.aifor other regions. - Create a new session.
- Choose a local project folder as the workspace.
- Start with a read-only task, such as asking for the project structure and entry points.
- For change-making tasks, review approval cards, commands, and file diffs before accepting.
- Verify the result using the built-in terminal, browser, or your own local tooling.
A safe first prompt is:
Summarize the directory structure and main entry points of this project. Do not modify files.
How to use Kimi Code in VS Code
Kimi Code for VS Code gives you a native editor workflow. You can ask questions inside the editor, reference files or folders with @, review code diffs visually, roll back changes when needed, and keep the chat panel in the activity bar, sidebar, or a separate tab.
- Install the Kimi Code extension from the VS Code Marketplace.
- Restart VS Code or run “Developer: Reload Window” if the extension does not appear.
- Open a workspace folder. The extension needs a folder to work properly.
- Choose Kimi Account Mode or API Key Mode.
- Use
@to reference a file or folder. - Ask for a plan before allowing multi-file edits.
- Review the diff and approve only the changes you understand.
- Run tests or manual checks before committing.
Useful VS Code shortcuts include Ctrl+Shift+K or Cmd+Shift+K to focus the Kimi input box, Alt+K to insert the current file reference, and Ctrl+N or Cmd+N for a new conversation if that shortcut is enabled.
Current Kimi Code models and model IDs
Kimi Code currently uses four model IDs across three model versions. Use the model ID, not the display name. For example, use k3, not “K3”, when a tool asks for a model ID.
| Model ID | Model version | Context window | Reasoning | Availability | Best for | Caveat |
|---|---|---|---|---|---|---|
k3 | K3 | 1048576 for higher-tier members | reasoning_effort: low / high / max, default high | Plus and above; 1M context for Pro and above | Large codebases, complex refactors, long-horizon coding, visual inputs | 1M context consumes more quota than k3-256k |
k3-256k | K3 256K context version | 262144 | reasoning_effort: low / high / max, default high | Plus and above | Everyday coding, routine feature work, smaller repos, single-file or small multi-file edits | Video input is not supported |
kimi-for-coding | K2.8 Preview | 1048576 | reasoning_effort: low / high / max, default max | Plus and above | Routine development, code completion, practical coding tasks, efficient thinking | Not the same label as K3 even if performance can be close for many coding tasks |
kimi-for-coding-highspeed | K2.7 Code HighSpeed | 262144 | Thinking on | Pro and above | Latency-sensitive coding loops where output speed matters | HighSpeed affects model output speed, not slow tools, scripts, builds, or tests |
Which Kimi Code model should you choose?
| Task | Recommended starting model | Why |
|---|---|---|
| Understand an unfamiliar repo | k3-256k or k3 | Use 256K for normal repos; use 1M when the codebase or context is genuinely large |
| Large codebase analysis | k3 | The 1M context option is built for larger cross-module work when your plan supports it |
| Routine feature work | kimi-for-coding | Good balance for everyday development and code completion |
| Fast coding output | kimi-for-coding-highspeed | Best when response speed matters and your plan includes HighSpeed |
| Small edits or single-file fixes | k3-256k or kimi-for-coding | Usually enough without spending more quota on 1M context |
| Image-based debugging | k3, kimi-for-coding, or HighSpeed | These support image input; k3-256k supports image but not video |
| Video input | k3, kimi-for-coding, or HighSpeed | Do not choose k3-256k for video input |
When switching models, consider starting a new session. Kimi’s docs explain that switching model IDs can invalidate the context cache, so the same context may need to be re-prefilled and usage can look higher immediately after switching.
Kimi Code membership, quotas, and Extra Usage
Kimi Code is included in Kimi membership benefits. Under the new membership structure, the Go tier has no coding quota, while Plus and above can use Kimi Code. Existing legacy subscribers keep their old plan names, quota rules, and renewal arrangement unless they choose to upgrade.
| Rule | New plans | Legacy plans |
|---|---|---|
| Kimi Code access | Plus and above | Andante and above |
| K3 access | Plus and above | Moderato and above |
| K3 1M context | Pro and above | Allegretto and above |
| HighSpeed access | Pro and above | Allegretto and above |
| Rolling 5-hour rate window | Yes | Yes |
| Weekly quota window | No | Yes |
| Monthly shared quota | Yes | Yes |
When they call the official Kimi model service, requests from Desktop, CLI, VS Code, logged-in devices, and Kimi Code API keys share the same Kimi Code quota. A different provider configured inside Desktop uses that provider’s own billing and limits. Kimi’s broader membership features also share a monthly credit pool. If that monthly pool is exhausted, Kimi Code can be affected even if a separate Kimi Code window still appears to have room.
Extra Usage is available as a fallback for subscribed members when quota runs out. It is shared between Kimi on the web and Kimi Code. Kimi states that subscription quota is deducted first and Extra Usage is used only after time-limited quota is exhausted. For heavy usage, upgrading the subscription may be more cost-effective than relying on top-ups.
A safe first workflow for a real repository
The safest way to use any coding agent is to make it inspect first, plan second, edit third, and verify last.
- Create a clean Git branch before you start.
- Open the repository in Kimi Code Desktop, CLI, or VS Code.
- Ask for a read-only architecture overview.
- Ask for a plan before any code changes.
- Review the plan and correct the scope.
- Ask Kimi Code to make the smallest useful change.
- Review every diff before accepting.
- Run tests, lint, build, or a manual smoke test.
- Ask Kimi Code to explain what changed and what still needs human review.
- Commit only after you understand the patch.
A good first prompt is:
Give me an overview of this repository's architecture. Do not modify files. Identify the main entry points, key modules, configuration loading path, test setup, and any risky areas I should understand before making changes.
Kimi Code prompt examples
| Workflow | Prompt template |
|---|---|
| Repository overview | Give me a repository architecture overview. Identify entry points, main modules, dependency flow, config loading, test structure, and the safest files to inspect first. Do not modify files. |
| Bug investigation | Find the likely cause of this bug before editing. Here is the error and reproduction path: [paste details]. List the most suspicious files and propose a fix plan. Wait for my approval before changing files. |
| Feature implementation | Add [feature] with these acceptance criteria: [criteria]. First create a plan, list files to change, and identify tests to add. After I approve, implement the smallest safe patch. |
| Refactor safely | Create a plan for refactoring [module]. Preserve behavior, avoid public API changes, add or update tests, and show the diff before finalizing. |
| Test generation | Add tests for [behavior]. Follow the existing test style, cover success, failure, and edge cases, then run the relevant test command and report results. |
| PR review | Review this pull request for correctness, security risks, missing tests, breaking changes, and unclear code. Report findings by severity and do not modify files. |
| Dead-code cleanup | Find likely dead code in [directory]. Explain why each item appears unused before deleting anything. Wait for approval before making changes. |
| Migration | Migrate [package/framework] from [old version] to [new version]. Start with a plan, list breaking changes, update code in small steps, and run tests after each major step. |
Advanced Kimi Code features
Kimi Code CLI includes advanced customization features for users who want more than a simple coding chat.
| Feature | What it does | Practical use | Caution |
|---|---|---|---|
| MCP | Connects external tool servers through the Model Context Protocol | Expose GitHub, databases, file tools, or remote services to the agent | Project-level MCP servers can run local commands; trust the repo first |
| Agent Skills | Reusable Markdown instructions with YAML frontmatter | Code style rules, PR review checklists, commit message formats, team workflows | Poorly written skills can steer the agent badly; keep them short and specific |
| Agents and sub-agents | Delegates focused sub-tasks to isolated agent contexts | Parallel repo exploration, planning, review, or large refactor analysis | Sub-agents consume their own model tokens; use them for complex tasks, not trivial edits |
| Hooks | Runs local scripts when specific events happen | Block risky commands, send notifications, append context, run checks | Hooks are fail-open and should not be your only security barrier |
Safety checklist before letting Kimi Code edit files
- Work in a clean Git branch.
- Start with read-only exploration.
- Ask for a plan before edits.
- Review file diffs before accepting changes.
- Run tests, lint, type checks, and builds yourself.
- Do not approve shell commands you do not understand.
- Do not paste secrets, tokens, SSH keys, private keys, or production credentials.
- Do not let the agent modify production systems without human approval.
- Check license, dependency, and security implications when packages change.
- Keep backups for important repositories.
- Redact session exports before sharing them because they may contain prompts, paths, command output, or sensitive traces.
Kimi Code vs Claude Code, Codex, Cursor, Copilot, Windsurf, and OpenCode
Do not compare coding agents only by brand name. Compare the workflow you need: terminal vs editor, local project access, approval controls, model context, multi-file editing, tests, MCP support, third-party tool compatibility, pricing, and quota behavior.
Kimi Code is strongest when you want Kimi’s coding models inside Desktop, CLI, VS Code, or supported third-party coding tools. Claude Code, Codex, Cursor, GitHub Copilot, Windsurf, and OpenCode may fit different teams depending on editor preference, existing subscriptions, enterprise controls, model preference, and integration needs. Use official docs for each tool before making a final decision.
Troubleshooting Kimi Code
| Problem | Likely cause | What to do |
|---|---|---|
Empty model list during /login | Invalid or expired API key, network issue, or platform mismatch | Check the key, confirm the Base URL, and make sure you are not mixing Kimi Code and Kimi Platform credentials |
| Invalid API key | Typo, revoked key, expired key, or environment variable override | Verify the key in the console and check variables such as KIMI_API_KEY or OPENAI_API_KEY |
| 401 with the correct model ID | Your plan may not include K3, 1M context, or HighSpeed | Use a model available to your plan or upgrade to the required tier |
| HighSpeed is not noticeably faster | Wrong model ID or tool/script time dominates the turn | Use exactly kimi-for-coding-highspeed and remember that builds, tests, file reads, and tool calls are not sped up by model output speed |
| Usage rises after switching models | Context cache no longer hits after model switch | Start a new session when changing model IDs or reasoning effort |
| 5-hour quota reached | Rolling usage window has been exhausted | Wait for the window to reset, check the console, buy Extra Usage, or upgrade |
| Weekly quota reached | Legacy plan weekly limit | Wait for the 7-day window, use Extra Usage, or upgrade to a new plan if appropriate |
| Monthly quota reached | Shared membership credit pool is exhausted | Wait for the monthly reset, upgrade, or use Extra Usage if enabled |
| VS Code says no workspace is open | No folder is open in VS Code | Open a project folder before using the extension |
| VS Code says CLI not found | Extension cannot find the CLI | Install Kimi Code CLI manually or configure kimi.executablePath in VS Code settings |
| VS Code shows no response | CLI unavailable, no model configured, or no workspace folder | Confirm the CLI is available, choose a model, open a folder, and check logs with “Kimi Code: Show Logs” |
| Connection timeout in VS Code | Request did not respond within the timeout window | Check network status and retry |
Sources checked
This article was checked against official Kimi sources: the Kimi Code product page, the Kimi Code documentation overview, the Kimi Code CLI Getting Started guide, the Kimi Code Desktop Quick Start, the Kimi Code for VS Code Quick Start, the Kimi Code model configuration page, the Kimi Code membership benefits page, the Kimi Code FAQ, the Kimi Code error reference, the MCP documentation, the Agent Skills documentation, the Agents and Sub-Agents documentation, and the Hooks documentation.
FAQ
What is Kimi Code?
Kimi Code is an AI coding service from Moonshot AI for developers. It works through Desktop, CLI, VS Code, and supported third-party coding tools, helping with code reading, file editing, command execution, debugging, refactoring, tests, documentation, and repo analysis.
Is Kimi Code free?
Access to the official Kimi Code models is part of eligible Kimi membership benefits. Under the new plan structure, Go has no coding quota, while Plus and above include access. Kimi Code Desktop also supports a separately configured third-party model provider, with that provider’s own costs and limits. Check the current plan and provider before assuming usage is free.
How do I install Kimi Code CLI?
The official recommended install script is curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash for macOS/Linux and irm https://code.kimi.com/kimi-code/install.ps1 | iex for Windows PowerShell. You can also install with npm using npm install -g @moonshot-ai/kimi-code if you have Node.js 22.19.0 or later.
Is there a Kimi Code VS Code extension?
Yes. Kimi Code for VS Code is installed from the VS Code Marketplace. It supports editor chat, file/folder references with @, diff review, rollback support, model configuration, and authentication through Kimi account mode or API key mode.
What models does Kimi Code use?
The current Kimi Code model IDs are k3, k3-256k, kimi-for-coding, and kimi-for-coding-highspeed. They map to K3, K3 256K, K2.8 Preview, and K2.7 Code HighSpeed respectively.
What is the difference between k3 and k3-256k?
k3 is the K3 model with up to 1M context for eligible higher-tier members. k3-256k is the fixed 256K-context version of K3. Use k3 for very large contexts and k3-256k for routine tasks where 256K is enough.
What is kimi-for-coding?
kimi-for-coding is the Kimi Code model ID for K2.8 Preview. It supports up to 1M context and low, high, or max reasoning effort. It is a good starting point for routine development and code-completion workflows.
What is kimi-for-coding-highspeed?
kimi-for-coding-highspeed is the HighSpeed K2.7 Code model ID. It is intended for faster coding output and is available to Pro and above under the new plan structure. It speeds up model output, not external tools, builds, tests, or scripts.
Can Kimi Code edit files and run commands?
Yes. Kimi Code can read files, edit files, and run commands. In the official clients, read-only operations can happen automatically, while file modifications and shell commands may require confirmation depending on your approval settings. You should still review diffs and commands manually.
What is the difference between Kimi Code and Kimi Platform API?
Kimi Code supports coding-agent workflows in Desktop, CLI, VS Code, and compatible third-party coding tools. Its official model service uses membership benefits and quota rules; Desktop can alternatively connect to another model provider under that provider’s terms. Kimi Platform API is a separate pay-as-you-go platform for applications and product integrations.
Is Kimi Code safe for private repositories?
Kimi Code can work with local repositories, but safety depends on how you use it. Avoid pasting secrets, review every shell command, work in a Git branch, inspect diffs, and do not run project-level MCP servers, hooks, or agent overrides from repositories you do not trust.
Can Kimi Code replace a developer?
No. Kimi Code can speed up coding tasks, explore codebases, draft patches, and run checks, but a developer still needs to review architecture choices, security implications, tests, dependencies, performance, and production readiness.
