# Kimi K2.7-Code

Kimi K2.7-Code costs $0.95 per 1M input tokens and $3.9995 per 1M output tokens on LLM API, with a 262K-token context window.

Model ID: `kimi-k2.7-code` · Moonshot AI · Text generation · Released June 12, 2026
Updated: 2026-10-27
Canonical: https://llmapi.ai/models/moonshotai-kimi-k2-7-code/

- Input: $0.95 per 1M tokens
- Output: $3.9995 per 1M tokens
- Cache read: $0.1608 (list $0.1608) per 1M tokens
- Context: 262K tokens
- Max output: 262K tokens

## Pricing

Lowest price among 3 providers, after discounts.

| Price | Amount | Per |
| --- | --- | --- |
| Input | $0.95 | per 1M tokens |
| Output | $3.9995 | per 1M tokens |
| Cache read | $0.1608 (list $0.1608) | per 1M tokens |

**Volume pricing.** At higher monthly volume, Kimi K2.7-Code may cost less. Book a call and sales will quote a price for your usage. [Book a call with sales](https://meetings.hubspot.com/julia-andriienko/llmapi) or [Create an account first](https://app.llmapi.ai/signup).

## Providers

Prices after each provider’s discount; the lowest in bold.

| Provider | Input / 1M | Output / 1M | Cache read / 1M | Context | Max output |
| --- | --- | --- | --- | --- | --- |
| [Novita AI](https://llmapi.ai/providers/novita/) | $0.95 | $4 | $0.19 | 262K | 4K |
| [CanopyWave](https://llmapi.ai/providers/canopywave/) | $0.95 | $4 | $0.19 | 262K | 262K |
| [Alibaba Cloud](https://llmapi.ai/providers/alibaba-cloud/) | $0.95 | **$3.9995** | **$0.1608** | 262K | 33K |

## Features

“Some providers”: not every provider of this model supports it.

- Tools: Yes
- Parallel tool calls: No
- Image input: Yes
- Reasoning: Yes (Levels: low, medium, high)
- Prompt caching: Yes
- Structured outputs: Yes
- JSON mode: Yes
- Streaming: Yes
- Web search: Some providers

## Call Kimi K2.7-Code

### Chat Completions (`POST /v1/chat/completions`)

Set LLMAPI_KEY to your LLM API key.

```python
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.llmapi.ai/v1",
    api_key=os.environ["LLMAPI_KEY"],
)

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

Docs: [Chat Completions docs](https://docs.llmapi.ai/api/v1/chat/completions)

## More from Moonshot AI

- [Kimi K3.1 Pro](https://llmapi.ai/models/kimi-k3-1-pro/): $2 / $10 per 1M input / output
- [Kimi K3](https://llmapi.ai/models/moonshotai-kimi-k3/): $2.7 / $13.5 per 1M input / output
- [Kimi K3.1 Pro HighSpeed](https://llmapi.ai/models/kimi-k3-1-pro-highspeed/): $4 / $20 per 1M input / output

Prices synced 2026-11-09.

Next step: [Get API key](https://app.llmapi.ai/signup)
