LiteLLMModels

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.

By Moonshot AIModel ID moonshot/kimi-k2.7-codePrices updated Checked
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.

ProviderModel name in LiteLLMInputOutputCache readContext
Moonshot AImoonshot/kimi-k2.7-code$0.95$4.00$0.19256K
Alibaba Cloud Model Studiodashscope/kimi-k2.7-code$0.95$4.00$0.19224K
Azure AI Foundryazure_ai/kimi-k2.7-code$0.95$4.00$0.19256K
Basetenbaseten/moonshotai/Kimi-K2.7-Code$0.95$4.00$0.16262K
Cloudflare Workers AIcloudflare/@cf/moonshotai/kimi-k2.7-code$0.95$4.00$0.19256K
DeepInfradeepinfra/moonshotai/Kimi-K2.7-Code$0.68$3.40$0.136256K
Fireworks AIfireworks_ai/accounts/fireworks/models/kimi-k2p7-code$0.95$4.00$0.19256K
Fireworks AIfireworks_ai/kimi-k2p7-code$0.95$4.00$0.19256K
Nebius AI Studionebius/moonshotai/Kimi-K2.7-Code$0.95$4.00–256K
Novita AInovita/moonshotai/kimi-k2.7-code$0.95$4.00$0.19256K
Perplexityperplexity/perplexity/kimi-k2.7-code$0.95$4.00$0.19–
Qianwen AI Platformqwen_ai_platform/kimi-k2.7-code$0.95$4.00$0.19224K
QwenCloudqwencloud/kimi-k2.7-code$0.95$4.00$0.19224K
Together AItogether_ai/moonshotai/Kimi-K2.7-Code$0.95$4.00$0.19256K
Weights & Biaseswandb/moonshotai/Kimi-K2.7-Code$0.71$3.50$0.15262K

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

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.

Python SDK
from litellm import completion

response = completion(
    model="moonshot/kimi-k2.7-code",
    messages=[{"role": "user", "content": "Hello!"}],
)
Proxy config.yaml
model_list:
  - model_name: kimi-k2.7-code
    litellm_params:
      model: moonshot/kimi-k2.7-code
      api_key: os.environ/MOONSHOT_API_KEY
Call the proxy
curl 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:

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.