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

# Moonshot Kimi Chat API

> Moonshot AI Kimi chat models — K3, K2 Instruct, K2 0905, K2 Thinking, K2.5, and K2.6 — via RouterBase, OpenAI-compatible chat completions.

## Overview

Moonshot AI's Kimi chat models on RouterBase, served through the
standard OpenAI-compatible chat completions endpoint with streaming and
tool calling. Includes the flagship **K3** — a reasoning model with native
vision understanding and a 1M-token context window — and the **K2 Thinking**
reasoning model.

|              |                      |
| ------------ | -------------------- |
| **Provider** | MoonshotAI           |
| **Families** | `kimi-k3`, `kimi-k2` |
| **Modality** | Chat                 |
| **Input**    | Text, Image (K3)     |
| **Output**   | Text                 |

## Models

* `moonshotai/kimi-k3`
* `moonshotai/kimi-k2.6`
* `moonshotai/kimi-k2.5`
* `moonshotai/kimi-k2-thinking`
* `moonshotai/kimi-k2-0905`
* `moonshotai/kimi-k2-instruct`

Pricing is deliberately not reproduced here. Rates are set per model in the
RouterBase catalogue and can be overridden per account, so any figure copied
into this page is a snapshot that goes stale the next time a rate changes.
Fetch the current rate for any model from the [Models API](/api-reference/models):

```http theme={null}
GET /api/models/{model}/pricing
```

URL-encode the slash in the model id — e.g. `moonshotai%2Fkimi-k3`.

## Endpoint

```http theme={null}
POST https://routerbase.com/v1/chat/completions
```

Drop-in compatible with the OpenAI [Chat Completions API](https://platform.openai.com/docs/api-reference/chat) —
point your existing OpenAI client at `https://routerbase.com/v1` with
your RouterBase key. See the full [Chat Completions reference](/api-reference/chat-completions)
for every supported parameter.

## Quickstart

```bash theme={null}
curl https://routerbase.com/v1/chat/completions \
  -H "Authorization: Bearer $ROUTERBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "moonshotai/kimi-k2.5",
    "messages": [
      { "role": "user", "content": "Explain agentic tool use in one sentence." }
    ]
  }'
```

```python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://routerbase.com/v1",
    api_key="$ROUTERBASE_API_KEY",
)

resp = client.chat.completions.create(
    model="moonshotai/kimi-k2-thinking",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
```

Set `"stream": true` for token streaming (Server-Sent Events), exactly
like the OpenAI API. Swap `model` for any id from the table above.
