Kimi Code / Kimi K3 Setup
Kimi Code is built for software development workflows, providing fast and reliable assistance for programming tasks. This guide shows how to install the official Kimi Code CLI and connect it to kimi-k3 with an I Code Easy API key.
Kimi Code CLI and Claude Code are different clients. If you use Claude Code, skip to the Claude Code section near the end of this page.
1. Install Kimi Code
macOS / Linux:
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
Windows PowerShell:
irm https://code.kimi.com/kimi-code/install.ps1 | iex
Open a new terminal after installation and verify the command:
kimi --version
See the official Kimi Code page for the installer and product overview.
2. Configure the I Code Easy API
Current Kimi Code versions store persistent settings in ~/.kimi-code/config.toml. Create this file if it does not exist. If it already exists, merge the following entries without overwriting existing providers, MCP servers, or permission settings, and keep only one top-level default_model entry.
default_model = "icodeeasy/kimi-k3"
[providers.icodeeasy]
type = "kimi"
base_url = "https://api.icodeeasy.cc/v1"
api_key = "your I Code Easy API key"
[models."icodeeasy/kimi-k3"]
provider = "icodeeasy"
model = "kimi-k3"
max_context_size = 1048576
capabilities = ["thinking", "always_thinking", "image_in", "video_in", "tool_use"]
display_name = "Kimi K3 (I Code Easy)"
support_efforts = ["max"]
default_effort = "max"
On macOS / Linux, restrict access to the configuration file:
chmod 600 ~/.kimi-code/config.toml
If the primary domain is slow from your network, change base_url to https://jp.icodeeasy.cc/v1 or https://sg.icodeeasy.cc/v1.
3. Start and verify
Open your project and start Kimi Code:
cd your-project
kimi
Inside Kimi Code, run /model and confirm that Kimi K3 (I Code Easy) is selected, then describe the programming task you want it to complete.
You do not need to run /login when using an I Code Easy API key. /login is for a Kimi account.
Temporary test configuration
Current Kimi Code versions do not automatically read a regular KIMI_API_KEY exported by the shell. For a temporary test that does not modify config.toml, use the dedicated KIMI_MODEL_* variables:
export KIMI_MODEL_NAME="kimi-k3"
export KIMI_MODEL_API_KEY="your I Code Easy API key"
export KIMI_MODEL_PROVIDER_TYPE="kimi"
export KIMI_MODEL_BASE_URL="https://api.icodeeasy.cc/v1"
export KIMI_MODEL_MAX_CONTEXT_SIZE="1048576"
export KIMI_MODEL_CAPABILITIES="thinking,always_thinking,image_in,video_in,tool_use"
kimi
These temporary settings disappear when the terminal session ends.
Use Kimi K3 256K through Claude Code
To use Kimi K3 256K in Claude Code, add the following to ~/.bashrc or ~/.zshrc:
export ANTHROPIC_AUTH_TOKEN="your I Code Easy API key"
export ANTHROPIC_BASE_URL="https://api.icodeeasy.cc"
export ANTHROPIC_MODEL="kimi-k3"
export ANTHROPIC_SMALL_FAST_MODEL="kimi-k3"
export ANTHROPIC_DEFAULT_SONNET_MODEL="kimi-k3"
export ANTHROPIC_DEFAULT_OPUS_MODEL="kimi-k3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-k3"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
kimi-k3 is the Claude Code compatibility model name. The three official primary upstreams currently map it to the actual k3-256k model. At the 0.25 user rate, effective input, cache-read, and output prices are ¥2.50, ¥0.25, and ¥12.50 per MTok. If the official pool is unavailable, traffic automatically falls back to Kimi K2.7 Code and is billed using the actual fallback model.
Save the file, run source ~/.bashrc or source ~/.zshrc, and then start claude. If the primary domain is slow, change ANTHROPIC_BASE_URL to https://jp.icodeeasy.cc or https://sg.icodeeasy.cc.
Windows users can set the same user-level environment variables in PowerShell and then open a new PowerShell window.