> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blocks.team/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi Code

> Coding agent powered by Moonshot AI's Kimi models

## Overview

Kimi Code is a coding agent powered by Moonshot AI's Kimi models. It offers strong performance on coding tasks and is a great option for teams looking to diversify beyond Anthropic and OpenAI providers.

## Latest Models

* **Kimi K2.7 Code** - Default model, tuned for coding tasks
* **Kimi K2.6** - Previous generation model
* **Kimi K3** - Largest model, with a 1M token context window

## Authentication

Kimi Code supports two authentication methods:

<Tabs>
  <Tab title="Kimi API Key">
    **Pay-as-you-go API access**

    1. Get an API key from [Moonshot AI Platform](https://platform.moonshot.cn/)
    2. In [Blocks Dashboard](https://blocks.team), go to **Dashboard** → **Agents**
    3. Select **Kimi Code** and choose "API Key"
    4. Paste your Kimi API key (`KIMI_API_KEY`)
  </Tab>

  <Tab title="Blocks">
    **Run on Blocks LLM credits**

    1. In [Blocks Dashboard](https://blocks.team), go to **Settings** → **Agents** → **Kimi Code**
    2. Set **Authentication Method** to "Blocks"

    There is no API key to set. Requests route through the Blocks AI Gateway and usage draws on your Blocks LLM credits. Kimi K2.6, Kimi K2.7 Code and Kimi K3 are all available.
  </Tab>
</Tabs>

## Setting as Default

To use Kimi Code automatically for all requests:

1. Go to **Dashboard** → **Agents**
2. Select "Set as default agent" from Kimi Code's dropdown menu

## Using Kimi Code

Once configured, Kimi Code is used automatically if it's your default agent:

```
@blocks can you review this code?
```

Or use the `/kimi` slash command to use it specifically:

```
@blocks /kimi implement this feature
```

```
@blocks /kimi review this PR for potential bugs
```

## Best For

* Coding tasks requiring a strong alternative to Anthropic and OpenAI models
* Teams wanting to diversify AI providers
* Cost optimization with a competitive pricing model

## Cost

Kimi Code uses your Kimi API key and is billed directly by Moonshot AI. Check pricing at the [Moonshot AI Platform](https://platform.moonshot.cn/).

With the **Blocks** authentication method there is no Moonshot AI bill. Requests route through the Blocks AI Gateway and are billed against your Blocks LLM credits.

## Next Steps

<CardGroup cols={2}>
  <Card title="Claude Code" icon="brain" href="/using-blocks/agents/claude-code">
    Learn about Claude Code
  </Card>

  <Card title="OpenCode" icon="globe" href="/using-blocks/agents/opencode">
    Explore OpenCode capabilities
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.