# Kimi K2.8 Preview API

> A preview of Moonshot's next Kimi K2 release, offered for early evaluation. Behaviour and pricing may change before general availability; use Kimi K3 for production.

- Model ID: `kimi-k2.8-preview`
- Family: Kimi
- Developer: Kimi
- Endpoints: `POST /v1/chat/completions`
- Web page: https://bigmodel.io/models/kimi-k2-8-preview
- Updated: 2026-10-18T19:56:25.671Z

## Pricing (USD per 1M tokens)

| Input | Output | Cached input |
| --- | --- | --- |
| $0.46 | $1.90 | $0 |

Charged per token from your prepaid USD balance. Billing rules: https://bigmodel.io/pricing

## Base URL

- OpenAI-compatible: https://bigmodel.io/v1

## Examples

Set `BIGMODEL_API_KEY` to a key from the BigModel.io console.

### curl

```bash
curl https://bigmodel.io/v1/chat/completions \
  -H "Authorization: Bearer $BIGMODEL_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "kimi-k2.8-preview",
  "messages": [
    {
      "role": "user",
      "content": "Hello!"
    }
  ]
}'
```

### Python

```python
# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://bigmodel.io/v1",
    api_key=os.environ["BIGMODEL_API_KEY"],
)

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

### JavaScript

```javascript
// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://bigmodel.io/v1",
  apiKey: process.env.BIGMODEL_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "kimi-k2.8-preview",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(completion.choices[0].message.content);
```
