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.
- Input
- $0.95 / 1M tokens
- Output
- $4.00 / 1M tokens
- Cache read
- $0.19 / 1M tokens
- Context window
- 262,144 tokens
- Max output
- 262,144 tokens
- Providers
- 14
- Added to LiteLLM
- June 2026
Kimi K2.7 Code pricing by provider
15 listings across 14 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.
| Provider | Model name in LiteLLM | Input | Output | Cache read | 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 |
What Kimi K2.7 Code costs in practice
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 |
Kimi K2.7 Code features
- Function calling
- Structured output
- Image input
- Video input
- Reasoning
- Prompt caching
- Web search
Use Kimi K2.7 Code with LiteLLM
Call Kimi K2.7 Code through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.
from litellm import completion
response = completion(
model="moonshot/kimi-k2.7-code",
messages=[{"role": "user", "content": "Hello!"}],
)model_list:
- model_name: kimi-k2.7-code
litellm_params:
model: moonshot/kimi-k2.7-code
api_key: os.environ/MOONSHOT_API_KEYcurl http://0.0.0.0:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{
"model": "kimi-k2.7-code",
"messages": [{"role": "user", "content": "Hello!"}]
}'Kimi K2.7 Code 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.
Sources
Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:
- platform.kimi.ai/docs/pricing/chat-k27-code
- www.alibabacloud.com/help/en/model-studio/models
- prices.azure.com/api/retail/prices?$filter=serviceName%20eq%20'Foundry%20Models'%20and%20armRegionName%20eq%20'eastus'%20and%20priceType%20eq%20'Consumption'
- inference.baseten.co/v1/models
LiteLLM docs: Moonshot AI, Alibaba Cloud Model Studio, Azure AI Foundry, Baseten, Cloudflare Workers AI, DeepInfra.
Provider pages: 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, QwenCloud.
