---
title: "Kimi Code CLI coding plan: config.toml setup"
description: "Kimi Code CLI on a coding plan from $10/mo: a provider and API key in config.toml for Sonnet 5.5, Opus 5.5 and Kimi K2.7 Code. No surprise charges."
url: https://codingpass.ai/tools/kimi-code
language: en
updated: 2026-11-17
---
# The coding plan for Kimi Code.

Keep Kimi Code CLI as it is. Add CodingPass as a provider with base\_url and your API key in config.toml, and run Claude Sonnet 5.5, Opus 5.5 and Kimi K2.7 Code on one monthly coding plan.

- Setup in 60s
- No surprise charges
- Full refund if you've used 5% or less

~/.kimi-code/config.toml

```
default_model = "codingpass/claude-sonnet-5-5"

[providers.codingpass]
type = "openai"
base_url = "https://codingpass.ai/v1"
api_key = "cp-live-…"

[models."codingpass/claude-sonnet-5-5"]
provider = "codingpass"
model = "claude-sonnet-5-5"
max_context_size = 200000
capabilities = ["thinking", "tool_use"]
```

Model ID for your plan

**Go**

claude-sonnet-5-5

**Plus**

claude-opus-5-5

**Pro**

claude-fable-5-2

## Moonshot AI's agent, open to any model.

A terminal coding agent with subagents, editor integration and video input, and all of it runs on CodingPass. Running several agents? [Magpie](https://codingpass.ai/tools/magpie) is a local gateway that puts Kimi Code and the others on one provider.

### Open-source Claude Code alternative

Works like Claude Code in your terminal: it reads and edits code, runs commands and hands work to coder, explore and plan subagents. It's MIT-licensed, and `/import-sessions` brings over your recent Claude Code and Codex sessions.

### Fewer tokens per task

In a third-party test it finished the same tasks with a fraction of the tokens Claude Code used, so each task takes less of your allowance.

### One binary, no Node.js

Installs with one command and needs no Node.js. The interface is ready in milliseconds.

### Zed, JetBrains and video input

`kimi acp` lets Zed, JetBrains or any Agent Client Protocol editor drive a session. Drop a screen recording into the chat and the agent watches what is hard to describe.

## Which plan for Kimi Code?

Every plan works with Kimi Code. Pick the Claude flagship you want as your default; all open-weight models, Kimi K2.7 Code included, come with every plan and share the same monthly allowance.

- [Full plan details](https://codingpass.ai/pricing#compare-plans)
- [Allowances for all 24 models](https://codingpass.ai/models)

### Go: Claude Sonnet 5.5

Best for Daily coding, with Kimi for the routine work

$10/mo

$60 Sonnet allowance a month

**Requests / month**

≈2,050

**Per 5-hour window**

≈342req

**Each open-weight model**

$40/mo

**Model ID**

claude-sonnet-5-5

### Plus: Claude Opus 5.5

Best for Large refactors, long agent sessions

$30/mo

$200 Opus allowance a month

**Requests / month**

≈3,420

**Per 5-hour window**

≈570req

**Each open-weight model**

$125/mo

**Model ID**

claude-opus-5-5

### Pro: Claude Fable 5.2

Best for Parallel subagents and the hardest problems

$100/mo

$500 Fable allowance a month

**Requests / month**

≈5,090

**Per 5-hour window**

≈848req

**Each open-weight model**

$300/mo

**Model ID**

claude-fable-5-2

Estimates from CodingPass traffic: about 100K tokens per request at roughly 5% input, 1% output and 94% cache read. A single Kimi Code task usually makes several requests. Allowances are metered at official API prices.

## Three steps. About a minute.

Kimi Code reads providers and models from `config.toml`. Add CodingPass once and every session runs through it.

1. ### Create a key
   Sign in with Google, GitHub or email and pick a plan. Then go to Dashboard → Keys → New key. Keys start with `cp-live-`.
2. ### Add the provider
   Paste the block into `~/.kimi-code/config.toml` with your key. Add one `[models."codingpass/…"]` table per model you want to switch to.
   `~/.kimi-code/config.toml`
3. ### Run kimi
   Start it in your project; the default model applies. On Plus or Pro, set `default_model` to your plan's flagship. [Get your request ID](https://codingpass.ai/tools#check).
   `kimi`

~/acme-blog Example session zsh

```
$ kimi

> The RSS feed shows drafts. Fix it and add a test.

● explore src/feed · 4 files
● Edited src/feed/rss.ts (+6 −2)
● Ran npm test · 14 passing
  The feed now filters on published: true, like the index page.
```

Sonnet 5.5

$2.80 / $60.00 resets in 11d

## Get more out of every allowance.

One monthly allowance covers every model, with 5-hour and weekly caps. The right model for the task makes it go further.

### Add Kimi K2.7 Code for routine work

Kimi Code works out of the box with Kimi models. Add `kimi-k2.7-code` as a second model and switch to it for routine work: on Go it can use up to $40 a month from the shared allowance.

```
[models."codingpass/kimi-k2.7-code"]
provider = "codingpass"
model = "kimi-k2.7-code"
max_context_size = 200000
capabilities = ["thinking", "tool_use"]
```

### Compact long sessions

In a long session, run `/compact` when the task moves on to its next part. Kimi Code compresses the context, so every later request sends fewer tokens. Add a note on what to keep:

```
/compact keep the API changes and the failing test output
```

## Questions about Kimi Code.

**Is this allowed? Could my account get banned?**

You use only your CodingPass key. You never log in to, share or relay anyone's account, so your own Claude or ChatGPT account isn't involved. Your requests follow each vendor's usage policy.

**Do I need a Kimi account?**

No. With the CodingPass provider in `config.toml` you can skip `/login`; requests use your CodingPass key only.

**Is this the old Python Kimi CLI?**

No. This guide is for Kimi Code CLI, which replaced the archived Python Kimi CLI. Its config lives in `~/.kimi-code/`.

**What happens when I hit the 5-hour cap?**

Each 5-hour window allows 1/6 of the monthly allowance (on Go, $10 of Sonnet 5.5, about 342 requests). The cap counts all models together, so CodingPass then returns 429 with the reset time for every model. Wait for the reset, buy a reset card for the current window, or upgrade. [How caps and 429s work](https://codingpass.ai/usage-limits#response).

## Same key, every agent.
