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

# Kimi K2.7 Code (Baseten)

> Moonshot's coding-tuned Kimi K2.7 Code (262K context) served by Baseten Model APIs.

**Chat** · Moonshot · served by Baseten

## Call it

Endpoint: `POST /v1/chat/completions` — set `model` to `kimi-k2.7-code-baseten`.

```bash cURL theme={"dark"}
curl https://api.aireserve.com/v1/chat/completions \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kimi-k2.7-code-baseten",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

```python Python theme={"dark"}
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aireserve.com/v1",
    api_key=os.environ["AIRESERVE_API_KEY"],
)

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

```typescript TypeScript theme={"dark"}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aireserve.com/v1",
  apiKey: process.env.AIRESERVE_API_KEY,
});

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

Full request and response reference: [Quickstart](/getting-started/quickstart).

## IDs & aliases

| Send as `model` | What it is |
| - | - |
| `kimi-k2.7-code-baseten` | Canonical gateway id |
| `claude-air-kimi-k2.7-code-baseten` | Claude Code picker id |

Every alias resolves at the gateway and is disclosed back as `requestedModelAlias` in usage metadata. Routing variants also apply: `kimi-k2.7-code-baseten:nitro` picks the fastest provider serving these weights and `kimi-k2.7-code-baseten:floor` the cheapest ([details](/models#provider-routing-variants)).

## Specs

| Spec | Detail |
| - | - |
| Modality | Text & chat — Chat |
| Model maker | Moonshot |
| Served by | Baseten |
| Context window | 262,144 tokens |
| Max output | 235,929 tokens |
| Pricing | \$0.95 in / \$4 out per 1M tokens |
| Cached input | \$0.16 per 1M tokens |
| Capabilities | Streaming, Tool use, Prompt caching |
| Hosting | United States |

Prices are public list rates at generation time and may lag the provider card; `GET /v1/models` and the portal's pricing page are authoritative for billing.

## Same weights, other providers

This id pins a specific serving route of [Kimi K2.7 Code (Moonshot)](/models/catalog/kimi-k2.7-code-moonshot) (`kimi-k2.7-code-moonshot`).

| Model id | Served by | Pricing |
| - | - | - |
| [`kimi-k2.7-code-alibaba`](/models/catalog/kimi-k2.7-code-alibaba) | Alibaba Cloud | \$0.95 in / \$4 out per 1M tokens |
| [`kimi-k2.7-code-deepinfra`](/models/catalog/kimi-k2.7-code-deepinfra) | DeepInfra | \$0.68 in / \$3.4 out per 1M tokens |
| [`kimi-k2.7-code-gmicloud`](/models/catalog/kimi-k2.7-code-gmicloud) | GMI Cloud | \$0.95 in / \$4 out per 1M tokens |
| [`kimi-k2.7-code-novita`](/models/catalog/kimi-k2.7-code-novita) | Novita AI | \$0.95 in / \$4 out per 1M tokens |
| [`kimi-k2.7-code-streamlake`](/models/catalog/kimi-k2.7-code-streamlake) | StreamLake | \$0.95 in / \$4 out per 1M tokens |

Same weights, different machines: speed, time to first token and cache behavior are the serving provider's. The unsuffixed id is the default we picked for reliability; pick a suffix when you need a specific provider's [data-handling terms](https://privacy.aireserve.com/data-handling).

> **[Browse all models](/models)**
>
> Search and filter every model by modality, maker, capability and price.


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