# Kimi (https://jackin.tailrocks.com/guides/authentication/kimi/)



[Kimi](https://www.kimi.com) provides an Anthropic-compatible coding endpoint (`https://api.kimi.com/coding`) backed by the `kimi-for-coding` model. Because the endpoint speaks the same protocol as Anthropic's API, Claude Code works against it without modification — jackin' injects the redirect at session-spawn time.

When `KIMI_CODE_API_KEY` is configured, opening a new Claude tab presents a provider picker with **Kimi** as one of the options. Operators without a Kimi key see no change: Kimi does not appear in the picker.

<Aside type="tip">
  Kimi is configured in the **Auth** tab of `jackin console` under the **Kimi** row. The same row covers both the Kimi Code CLI agent runtime (sync mode) and the Kimi API provider for Claude Code (api\_key mode). Configure it the same way as Z.AI or MiniMax — not by hand-editing any config file.
</Aside>

## Subscribe and get an API key [#subscribe-and-get-an-api-key]

1. Open [Kimi membership pricing](https://www.kimi.com/membership/pricing), sign in, and purchase a Kimi membership. The coding endpoint benefit is included in paid membership plans.
2. After your membership is active, open the [Kimi Code Console](https://www.kimi.com/code/console) and go to **API Keys**. Create a new key — the key is shown only once and starts with `sk-ki`. Copy it immediately.
3. You can create up to 5 keys. Keep your key private. Store it in jackin' through the Auth settings below; do not paste it into Claude Code's host settings.

<Aside type="note">
  Kimi's coding endpoint (`api.kimi.com/coding`) is distinct from the general Moonshot platform endpoint (`api.moonshot.ai/v1`). The membership benefit is the coding endpoint; the key is managed in the Kimi Code Console, not in the Moonshot platform. Kimi's coding subscriptions also carry weekly and rate-limit windows with no carryover — plan your usage accordingly.
</Aside>

## Configure your Kimi API key in jackin' [#configure-your-kimi-api-key-in-jackin]

1. Open `jackin console`, select your workspace, and switch to the **Auth** tab.
2. Scroll to the **Kimi** row and press `Enter` or `Space` to open the auth form.
3. Set the mode to **API Key** (press `Space` to cycle).
4. Enter your `KIMI_CODE_API_KEY` — either a literal key or a 1Password reference resolved at launch time.
5. Save the form.

The key is written to the `[env]` map in your config file at the scope you chose (global or per-workspace). A workspace-level key overrides the global one.

To remove Kimi, open the same row, cycle the mode back to **Ignore**, and save.

## Using the provider picker [#using-the-provider-picker]

With `KIMI_CODE_API_KEY` configured:

**At workspace launch** — launch a workspace and choose the Claude agent. Before the container starts, a provider picker appears. Use arrow keys and `Enter` to pick. `Escape` cancels back to the agent picker.

**In the multiplexer** — press `N` inside a running container to open a new agent tab. When you pick Claude, the same provider picker appears if multiple providers are available.

## Tab labels [#tab-labels]

The tab strip label reflects the active provider:

| Active provider | Tab label            |
| --------------- | -------------------- |
| Anthropic       | `Claude (Anthropic)` |
| Kimi            | `Claude (Kimi)`      |

When only Anthropic is configured, the bare `Claude` label is used — no suffix.

## Scopes [#scopes]

`KIMI_CODE_API_KEY` follows the standard 4-layer env resolution — most-specific wins:

**per-(workspace × role) > per-workspace > global > absent**

Set a global key to have Kimi available in every workspace, or set a per-workspace key to restrict it to specific projects.

## How the redirect works [#how-the-redirect-works]

When you select Kimi in the provider picker, jackin' injects environment variables into the spawned Claude Code process at launch time — not into any shared config file:

* `ANTHROPIC_AUTH_TOKEN` — set to your `KIMI_CODE_API_KEY` value
* `ANTHROPIC_BASE_URL` — set to `https://api.kimi.com/coding`
* `ANTHROPIC_DEFAULT_OPUS_MODEL` — set to `kimi-for-coding`
* `ANTHROPIC_DEFAULT_SONNET_MODEL` — set to `kimi-for-coding`
* `ANTHROPIC_DEFAULT_HAIKU_MODEL` — set to `kimi-for-coding`
* `API_TIMEOUT_MS` — set to `3000000` (50-minute timeout for long-running operations)
* `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` — set to `1`

`kimi-for-coding` is the single model served by the coding endpoint, so all three Claude tier slots map to the same model. The timeout prevents premature disconnection on long agent runs through the proxy.

**No other tabs or sessions in the container are affected.** Anthropic tabs continue to use the container's own credentials.

Your `KIMI_CODE_API_KEY` is never written to the logs, including `--debug` output.

## See also [#see-also]

* [Authentication overview](/guides/authentication/) — the shared modes / scopes / defaults pattern jackin' applies across every auth axis.
* [Z.AI (GLM Coding Plan)](/guides/authentication/zai/) — the other Anthropic-compatible alternative provider.
* [MiniMax (Token Plan)](/guides/authentication/minimax/) — MiniMax's Anthropic-compatible endpoint.
* [Agent Authentication](/guides/authentication/agents/) — covers agent runtime auth forwarding for the Kimi Code CLI and other agents.
* [Environment Variables](/guides/environment-variables/) — how the operator env-vars model supplies credentials at global and per-workspace scope.
