Kimi K2.7 Code
By MoonshotAI. 1.03 trillion parameters, a context window of 262,144 tokens and the licence other.
Facts
- Released
- 2026-06-11 the day the repository was first published on Hugging Face Hugging Face, read
- Licence
- other the licence the model card declares Hugging Face, read
- Open weights
- Yes the weights are published in this Hugging Face repository Hugging Face, read
- Parameters
- 1.03 trillion counted from the safetensors weight files Hugging Face, read
- Active parameters
- 33.3 billion estimate estimated from the expert counts and sizes in the configuration model configuration, read
- Knowledge cutoff
- Unknown
- Context window
- 262,144 tokens the maximum position embeddings in the model configuration model configuration, read
- 262,144 tokens the context length OpenRouter lists OpenRouter, read
- Longest output
- 235,929 tokens the largest output OpenRouter's first provider allows OpenRouter, read
- Tool calling
- Yes OpenRouter lists tools among the supported parameters OpenRouter, read
- Structured output
- Yes OpenRouter lists structured outputs among the supported parameters OpenRouter, read
- Reasoning controls
- Yes OpenRouter lists reasoning controls OpenRouter, read
- Inputs and outputs
- text, image in, text out Hugging Face, read
- Good for
- Vision: Hugging Face files it under image-text-to-text Hugging Face, read
- Coding: the maker's name for the model marks it for code Hugging Face, read
- Reasoning: OpenRouter lists reasoning controls for it OpenRouter, read
Prices
| Provider | Input | Output | Context | As of | Source |
|---|---|---|---|---|---|
| Inceptron through OpenRouter | 0.656 USD | 3.30 USD | 262,144 | OpenRouter endpoints, read | |
| Kilo Gateway direct | 0.656 USD | 3.30 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| OpenRouter direct | 0.656 USD | 3.30 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Inceptron direct | 0.660 USD | 3.40 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Deep Infra direct | 0.680 USD | 3.40 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| DeepInfra through OpenRouter | 0.680 USD | 3.40 USD | 262,144 | OpenRouter endpoints, read | |
| Ambient direct | 0.690 USD | 3.49 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| CoreWeave direct | 0.710 USD | 3.50 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| CoreWeave through OpenRouter | 0.710 USD | 3.50 USD | 262,144 | OpenRouter endpoints, read | |
| StreamLake through OpenRouter | 0.713 USD | 3.00 USD | 256,000 | OpenRouter endpoints, read | |
| Venice through OpenRouter | 0.750 USD | 3.50 USD | 256,000 | OpenRouter endpoints, read | |
| ai& direct | 0.750 USD | 3.50 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| ModelRun through OpenRouter | 0.850 USD | 3.75 USD | 262,144 | OpenRouter endpoints, read | |
| SiliconFlow direct | 0.859 USD | 3.80 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| SiliconFlow through OpenRouter | 0.859 USD | 3.80 USD | 262,144 | OpenRouter endpoints, read | |
| Novita through OpenRouter | 0.912 USD | 3.84 USD | 262,144 | OpenRouter endpoints, read | |
| Abacus direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Alibaba through OpenRouter | 0.950 USD | 4.00 USD | 262,144 | OpenRouter endpoints, read | |
| BaseTen through OpenRouter | 0.950 USD | 4.00 USD | 262,000 | OpenRouter endpoints, read | |
| Baseten direct | 0.950 USD | 4.00 USD | 262,000 | older than 30 days; check the provider | models.dev, read |
| Cloudflare through OpenRouter | 0.950 USD | 4.00 USD | 262,144 | OpenRouter endpoints, read | |
| Fireworks through OpenRouter | 0.950 USD | 4.00 USD | 262,144 | OpenRouter endpoints, read | |
| GMICloud through OpenRouter | 0.950 USD | 4.00 USD | 262,144 | OpenRouter endpoints, read | |
| HPC-AI direct | 0.950 USD | 4.00 USD | 256,000 | older than 30 days; check the provider | models.dev, read |
| Hugging Face direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Moonshot AI through OpenRouter | 0.950 USD | 4.00 USD | 262,144 | OpenRouter endpoints, read | |
| NanoGPT direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Nebius through OpenRouter | 0.950 USD | 4.00 USD | 262,144 | OpenRouter endpoints, read | |
| Nebius Token Factory direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| NovitaAI direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Ofox direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Pioneer direct | 0.950 USD | 4.00 USD | 256,000 | older than 30 days; check the provider | models.dev, read |
| Together AI direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Vercel AI Gateway direct | 0.950 USD | 4.00 USD | 256,000 | older than 30 days; check the provider | models.dev, read |
| ZenMux direct | 0.950 USD | 4.00 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| OpenReason direct | 1.00 USD | 4.22 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| TensorX direct | 1.25 USD | 4.50 USD | 262,144 | older than 30 days; check the provider | models.dev, read |
| Moonshot AI through OpenRouter | 1.90 USD | 8.00 USD | 262,144 | OpenRouter endpoints, read |
Run it on your own hardware
Weights are the sizes of the files a source lists, or an estimate from the parameter count where none does. Memory is an estimate: weights plus KV cache plus 512 MiB and 5 percent of the weights for runtime buffers. Check it against your hardware.
| Quantization | Weights | Memory at 8,192 tokens | Memory at 32,768 tokens |
|---|---|---|---|
| UD-IQ1_M | 283 GiB | 298 GiB | 300 GiB |
| UD-IQ2_XXS | 296 GiB | 312 GiB | 313 GiB |
| UD-IQ2_M | 296 GiB | 312 GiB | 314 GiB |
| UD-Q2_K_XL | 316 GiB | 333 GiB | 335 GiB |
| UD-IQ3_S | 390 GiB | 411 GiB | 412 GiB |
| UD-Q3_K_M | 432 GiB | 454 GiB | 456 GiB |
| UD-Q3_K_XL | 432 GiB | 455 GiB | 456 GiB |
| UD-Q4_K_XL | 544 GiB | 572 GiB | 573 GiB |
Start it with a local runtime
- Ollama
ollama run hf.co/unsloth/Kimi-K2.7-Code-GGUF:UD-IQ1_M - LM Studio
lms get unsloth/Kimi-K2.7-Code-GGUF lms server start - llama.cpp server
llama-server -hf unsloth/Kimi-K2.7-Code-GGUF:UD-IQ1_M --jinja - vLLM
vllm serve moonshotai/Kimi-K2.7-Code - SGLang
sglang serve --model-path moonshotai/Kimi-K2.7-Code --port 30000
Use it from your harness
Set up for Abacus with the model moonshotai/Kimi-K2.7-Code. Each endpoint page has the same setup for its own address.
OpenCode
Put this in opencode.json in your project folder:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"abacus": {
"npm": "@ai-sdk/openai-compatible",
"name": "Abacus",
"options": {
"baseURL": "https://routellm.abacus.ai/v1",
"apiKey": "{env:ABACUS_API_KEY}"
},
"models": {
"moonshotai/Kimi-K2.7-Code": {
"name": "Kimi K2.7 Code",
"limit": {
"context": 262144,
"output": 235929
}
}
}
}
}
}- OpenCode reads any OpenAI-compatible address through the @ai-sdk/openai-compatible package, and an address that speaks the Responses API through @ai-sdk/openai.
From OpenCode documentation, read .
Pi
Put this in ~/.pi/agent/models.json:
{
"providers": {
"abacus": {
"baseUrl": "https://routellm.abacus.ai/v1",
"api": "openai-completions",
"apiKey": "$ABACUS_API_KEY",
"models": [
{
"id": "moonshotai/Kimi-K2.7-Code"
}
]
}
}
}- The apiKey field can name an environment variable as $NAME.
From Pi documentation, read .
Codex
Codex speaks only the Responses API, and Abacus documents no Responses address. A gateway that offers one can sit in between.
- Codex speaks the Responses API only: responses is the one supported wire API of a custom provider. Ollama and LM Studio are built in and start with --oss.
From Codex documentation, read .
Claude Code
Claude Code sends Anthropic Messages requests, and Abacus documents no such address. A gateway that translates to that API can sit in between.
- Claude Code sends Anthropic Messages requests to ANTHROPIC_BASE_URL. Anthropic says it does not support routing Claude Code to models other than Claude through any gateway, so some features may not work with another model.
From Claude Code documentation, read .
Other ways to reach it
- ai&, model
moonshotai/kimi-k2.7-code - Ambient, model
moonshotai/kimi-k2.7-code - Baseten, model
moonshotai/Kimi-K2.7-Code - DeepInfra, model
moonshotai/Kimi-K2.7-Code - HPC-AI, model
moonshotai/kimi-k2.7-code - Hugging Face, model
moonshotai/Kimi-K2.7-Code - Inceptron, model
moonshotai/Kimi-K2.7-Code - Kilo Gateway, model
moonshotai/kimi-k2.7-code - NanoGPT, model
moonshotai/kimi-k2.7-code - Nebius Token Factory, model
moonshotai/Kimi-K2.7-Code - NovitaAI, model
moonshotai/kimi-k2.7-code
Published results
These are results other people published. Baltor did not run them and does not rank models by them.
- Results the maker published on the model card published by moonshotai Hugging Face, read
- Artificial Analysis Intelligence Index: 25.8 published by Artificial Analysis OpenRouter, read
- Artificial Analysis Coding Index: 60.8 published by Artificial Analysis OpenRouter, read
- Artificial Analysis Agentic Index: 21 published by Artificial Analysis OpenRouter, read
Sources of this page
- huggingface.co/api/models/moonshotai/Kimi-K2.7-Code, read
- huggingface.co/moonshotai/Kimi-K2.7-Code/raw/main/config.json, read
- huggingface.co/api/models/unsloth/Kimi-K2.7-Code-GGUF/tree/main, read
- openrouter.ai/api/v1/models/moonshotai/kimi-k2.7-code-20260612/endpoints, read
- openrouter.ai/api/v1/models, read
- models.dev/api.json, read
Paid links
No link in this directory is a paid link or an ad, and no listing is paid for. The order and the contents of every list come from the sources named on this page.