Kimi K3.1 Pro Open Weights Are Out: Self-Hosting Guide and API Cost Math (2026)
Moonshot AI promised to publish the full Kimi K3.1 Pro weights by November 4, 2026. That deadline has passed, and the model repositories are now live on Hugging Face. Until this week, teams that wanted K3.1 Pro had to call Moonshot's hosted API. Now they can also run the model on their own hardware, or through a provider that serves open weights.
Open weights don't automatically mean cheaper. The API charges $2.00 per million input tokens and $10.00 per million output tokens. Self-hosting only pays off with steady traffic, a rule that keeps prompts off third-party servers, or an ops team that can keep GPUs busy. This guide covers the cost math, the self-hosting path, and API calls you can copy.
- Kimi K3.1 Pro costs $2.00 per 1M input tokens and $10.00 per 1M output tokens on Moonshot's API, with cached input at $0.20 per 1M tokens.
- Kimi K3.1 Pro Highspeed costs $4.00 per 1M input tokens and $20.00 per 1M output tokens, and Moonshot says it runs 2 to 3 times faster than the standard model.
- Kimi K3.1 Pro has a 1,000,000-token context window, with thinking always on and a reasoning_effort setting of low, high, or max (default max).
- The full weights were promised by November 4, 2026. The Hugging Face repository moonshotai/Kimi-K3.1-Pro uses a custom license tagged license:other.
- Moonshot closed the K2 series to new users on October 31, 2026, and plans to retire it by the end of December 2026.
What Was Released
Moonshot launched K3.1 Pro on October 23, 2026, on Kimi.com, Kimi Code, and the Kimi API, alongside a Highspeed variant. The Hugging Face listing for moonshotai/Kimi-K3.1-Pro is tagged with transformers, safetensors, and an 8-bit variant. Community quantized copies from other uploaders appeared within days.
Two details matter before you download anything. The repository is tagged custom_code, so loading it runs model code that ships with the repo. Pin a specific commit and read the modeling files first. The license tag is license:other, so have someone read the terms before you ship a commercial product on it.
Pricing: Kimi Against Other Options
All prices below are USD per 1M tokens, from each vendor's published pricing.
| Model | Input per 1M | Output per 1M | Context window |
|---|---|---|---|
| Kimi K3.1 Pro | $2.00 | $10.00 | 1,000,000 tokens |
| Kimi K3.1 Pro Highspeed | $4.00 | $20.00 | 1,000,000 tokens |
| GPT-6.1 Sol | $2.00 | $10.00 | 1,050,000 tokens |
| Claude Sonnet 5.5 | $2.00 | $10.00 | 1,000,000 tokens |
| DeepSeek-V4.1-Flash-1017 (off-peak) | $0.15 | $0.60 | 1,000,000 tokens |
Kimi's cache-hit rate is $0.20 per 1M input tokens. Writing a cache entry costs more: $2.00 per 1M for a 5-minute TTL and $4.00 per 1M for one hour. Caching only saves money when the same prefix gets reused. Put the stable system prompt and tool schema first, and per-user data last.
Moonshot's launch chart shows K3.1 Pro at 65.7% on Terminal-Bench 4.0, against 66.4% for Claude Opus 5.5 and 58.2% for GPT-6 Astra. Those are vendor-reported numbers. Run your own evals on your own tasks before you move a production route.
How Kimi K3.1 Pro Compares
| Attribute | Kimi K3.1 Pro | GPT-6.1 Sol | Claude Sonnet 5.5 |
|---|---|---|---|
| Weights | Published on Hugging Face (license:other) | Hosted only | Hosted only |
| Input / output per 1M | $2.00 / $10.00 | $2.00 / $10.00 | $2.00 / $10.00 |
| Context window | 1,000,000 tokens | 1,050,000 tokens | 1,000,000 tokens |
| Best for | Teams that need weights they can host | Tool-heavy workflows on the Responses API | Teams already on the Anthropic Messages API |
| Key limitation | Self-hosting needs multi-GPU hardware and ops work | Input above 272,000 tokens bills at 2x input and 1.5x output | 5-minute cache writes cost 1.25x base input |
Cost Math: API Versus Self-Hosting
Take a workload of 200 million input tokens and 20 million output tokens per month, with 60% of input tokens hitting the cache.
- Kimi K3.1 Pro API: 120M cached input at $0.20 is $24. 80M uncached input at $2.00 is $160. 20M output at $10.00 is $200. Total: $384 per month.
- Kimi K3.1 Pro Highspeed API: the same cache split costs $24 for cached input. 80M uncached input at $4.00 is $320. 20M output at $20.00 is $400. Total: $744 per month.
Self-hosting costs GPU rental or purchase, power, storage, and engineer time. Get a real quote for the hardware the model card requires, then compare it with the $384 figure. A rented multi-GPU node that sits idle at night often costs more than the API bill for a team this size. Self-hosting makes sense at much higher volume, or when a data-residency rule forbids sending prompts to a vendor.
Use the API cost calculator to test your own numbers, and the token counter to measure real prompt sizes before you estimate.
Call the API With curl
curl https://api.moonshot.ai/v1/chat/completions \
-H "Authorization: Bearer $MOONSHOT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k3.1-pro",
"reasoning_effort": "low",
"messages": [
{"role": "system", "content": "You are a release-notes writer. Keep answers under 80 words."},
{"role": "user", "content": "Summarize the breaking changes in this changelog: ..."}
]
}'
Use low for classification and extraction. Save max for cases where a wrong answer costs more than the extra tokens. Thinking is always on, so even a low setting produces reasoning tokens, and you pay the output rate for them.
Call It From Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["MOONSHOT_API_KEY"],
base_url="https://api.moonshot.ai/v1",
)
resp = client.chat.completions.create(
model="kimi-k3.1-pro",
messages=[
{"role": "system", "content": "You are a strict code reviewer."},
{"role": "user", "content": "Review this function for off-by-one errors: ..."},
],
extra_body={"reasoning_effort": "low"},
)
print(resp.choices[0].message.content)
print(resp.usage)
Self-Hosting the Open Weights
Serve the weights with an OpenAI-compatible server such as vLLM or SGLang. The model card lists the supported serve commands and the GPU memory you need. Start there instead of guessing at hardware. Once the server runs, point the same OpenAI client at your own host:
from openai import OpenAI
local = OpenAI(api_key="not-needed", base_url="http://localhost:8000/v1")
resp = local.chat.completions.create(
model="moonshotai/Kimi-K3.1-Pro",
messages=[{"role": "user", "content": "Explain this stack trace: ..."}],
)
print(resp.choices[0].message.content)
Port 8000 is the vLLM default. Check /v1/models for the exact served model name before you hard-code it. Put the self-hosted endpoint behind your own authentication. An open port without a key lets anyone who finds it spend your GPU time.
Migrating From K2
If your code still calls a K2-series model, plan the move now. Moonshot closed the K2 series to new users on October 31, 2026, and plans to retire it by the end of December 2026. Run K3.1 Pro against a copy of your real prompts. Compare output format, tool-call behavior, and token counts. Then cut over behind a feature flag so you can roll back in one step.
Where a Gateway Fits
Comparing Kimi K3.1 Pro with GPT-6.1 Sol or Claude Sonnet 5.5 usually means three SDKs and three billing accounts. One OpenAI-compatible gateway reduces that to one base URL and one key. KissAPI is one option for this. Keep the model name in configuration, so a price change or outage on one vendor is a one-line routing change.
FAQ
Are Kimi K3.1 Pro weights open source?
The weights are published on Hugging Face under a custom license tagged license:other. "Open weights" describes that accurately. Read the license before using the model commercially.
How much does Kimi K3.1 Pro cost through the API?
Kimi K3.1 Pro costs $2.00 per 1M input tokens and $10.00 per 1M output tokens. Cached input costs $0.20 per 1M tokens. Kimi K3.1 Pro Highspeed costs $4.00 input and $20.00 output per 1M tokens.
Should I migrate from Kimi K2?
Yes, plan the migration now. Moonshot closed the K2 series to new users on October 31, 2026, and plans to retire it by the end of December 2026.
Want One Endpoint to Test Several Models?
Create a free account at api.kissapi.ai/register and run your prompts against more than one model before you pick a default.
Start Free