# Kimi K2.7 Code API Pricing

As of October 10, 2026, Kimi K2.7 Code costs $0.95 per 1M input tokens and $4.00 per 1M output tokens on Moonshot AI, with cache reads at $0.19 per 1M tokens. Across 14 providers on LiteLLM, the input price ranges from $0.68 to $0.95. It has a 262,144-token context window and returns up to 262,144 tokens per response.

- Page: https://models.litellm.ai/models/kimi-k2.7-code
- Lab: Moonshot AI
- LiteLLM model name: `moonshot/kimi-k2.7-code`
- Context window: 262,144 tokens
- Max output: 262,144 tokens
- Added to LiteLLM: June 2026
- Prices updated: October 10, 2026

## Pricing by provider

Token prices in USD per 1M tokens.

| Provider | Model name | Input | Output | Cache read | Per image | Per second | Context |
|---|---|---|---|---|---|---|---|
| Moonshot AI | `moonshot/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| Alibaba Cloud Model Studio | `dashscope/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 224K |
| Azure AI Foundry | `azure_ai/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| Baseten | `baseten/moonshotai/Kimi-K2.7-Code` | $0.95 | $4.00 | $0.16 | – | – | 262K |
| Cloudflare Workers AI | `cloudflare/@cf/moonshotai/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| DeepInfra | `deepinfra/moonshotai/Kimi-K2.7-Code` | $0.68 | $3.40 | $0.136 | – | – | 256K |
| Fireworks AI | `fireworks_ai/accounts/fireworks/models/kimi-k2p7-code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| Fireworks AI | `fireworks_ai/kimi-k2p7-code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| Nebius AI Studio | `nebius/moonshotai/Kimi-K2.7-Code` | $0.95 | $4.00 | – | – | – | 256K |
| Novita AI | `novita/moonshotai/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| Perplexity | `perplexity/perplexity/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | – |
| Qianwen AI Platform | `qwen_ai_platform/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 224K |
| QwenCloud | `qwencloud/kimi-k2.7-code` | $0.95 | $4.00 | $0.19 | – | – | 224K |
| Together AI | `together_ai/moonshotai/Kimi-K2.7-Code` | $0.95 | $4.00 | $0.19 | – | – | 256K |
| Weights & Biases | `wandb/moonshotai/Kimi-K2.7-Code` | $0.71 | $3.50 | $0.15 | – | – | 262K |

## Cost examples

1,000 requests with 2,000 input and 500 output tokens each:

- Moonshot AI: $3.90
- DeepInfra: $3.06
- Weights & Biases: $3.17
- Alibaba Cloud Model Studio: $3.90

100 long-document requests with 100,000 input and 2,000 output tokens each:

- Moonshot AI: $10.30
- DeepInfra: $7.48
- Weights & Biases: $7.80
- Alibaba Cloud Model Studio: $10.30

## Features

Supported: Function calling, Structured output, Image input, Video input, Reasoning, Prompt caching, Web search.

## Use it with LiteLLM

```python
from litellm import completion

response = completion(
    model="moonshot/kimi-k2.7-code",
    messages=[{"role": "user", "content": "Hello!"}],
)
```

## FAQ

### How much does Kimi K2.7 Code cost?

Kimi K2.7 Code costs $0.95 per 1M input tokens and $4.00 per 1M output tokens on Moonshot AI, with cache reads at $0.19 per 1M tokens. Across 14 providers on LiteLLM, the input price ranges from $0.68 to $0.95.

### What is the context window of Kimi K2.7 Code?

Kimi K2.7 Code has a 262,144-token context window and returns up to 262,144 tokens per response.

### Which providers offer Kimi K2.7 Code?

Kimi K2.7 Code is available from 14 providers through LiteLLM: Moonshot AI, Alibaba Cloud Model Studio, Azure AI Foundry, Baseten, Cloudflare Workers AI, DeepInfra, Fireworks AI, Nebius AI Studio, Novita AI, Perplexity, Qianwen AI Platform and QwenCloud and 2 more. The lowest price is on DeepInfra.

### How do I call Kimi K2.7 Code with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="moonshot/kimi-k2.7-code", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

### What features does Kimi K2.7 Code support?

Kimi K2.7 Code supports function calling, structured output, image input, video input, reasoning, prompt caching and web search.

### When did LiteLLM add Kimi K2.7 Code?

Kimi K2.7 Code was added to LiteLLM's model price file in June 2026.

Source: LiteLLM model price file, https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json
