Kimi's docs set two dates: K2-series models closed to newly registered users on October 31, 2026, and the whole K2 series retires by the end of December 2026. Accounts that existed before the October cutoff keep running until December. The migration is four field edits plus a cleanup: switch the model id to kimi-k3.1-pro or kimi-k3, set base_url to https://api.moonshot.ai/v1, replace the K2 thinking block with the top-level reasoning_effort field, rename max_tokens to max_completion_tokens, and drop the five sampling parameters K3.1 Pro fixes on the server.
Two separate retirements get mashed together under the name K2. The original kimi-k2 preview series went away in May 2026. What people still run in production is the wider K2 series, and the December deadline is about that one.
When does Kimi K2 actually stop working?
| Date | What changed |
|---|---|
| May 2026 | kimi-k2-0905-preview, kimi-k2-0711-preview, kimi-k2-turbo-preview, kimi-k2-thinking and kimi-k2-thinking-turbo retired |
| July 2026 | Kimi K3 opened on the Open Platform API; kimi-k2.5 and the moonshot-v1 series stopped being offered to newly registered users |
| August 2026 | kimi-k2.5 and all moonshot-v1 models retired on every platform; calls now return a 404 "model not found" error |
| October 31, 2026 | K2 series models no longer available to newly registered users; existing users unaffected |
| End of December 2026 | All K2 series models retired |
If your account predates October 31, nothing breaks today, and that quiet is the problem. The failure lands on a December deploy, weeks after everyone stopped paying attention. Treat the remaining weeks as a migration window rather than as runway.
One more number to check in your own code: K2 series models accept 262,144 tokens of context, and every K3 series model accepts 1,048,576. Chunking logic written for the 256K ceiling can come out. Anything that leaned on that ceiling as a safety valve can now send up to four times the context it used to.
What changes in my request when I switch to kimi-k3.1-pro?
Four fields change, and one block of parameters has to go.
model: direct API calls and Codex usekimi-k3.1-pro. Claude Code uses the compatible aliaskimi-k3[1m].base_url: set it tohttps://api.moonshot.ai/v1. Leave it out and the OpenAI SDK posts to OpenAI, which answers withmodel_not_found.- Thinking config: delete the K2.x
thinkingblock and set the top-levelreasoning_effortfield tolow,highormax. The default ismax, and K3.1 Pro always thinks; there is no off switch. max_tokens: deprecated across the platform.max_completion_tokensmeans the same thing, defaults to 131072 and accepts up to 1048576.
Then delete temperature, top_p, n, presence_penalty and frequency_penalty from the request body. K3.1 Pro fixes them at 1.0, 0.95, 1, 0 and 0, and the docs ask you to omit them.
Two behavioral rules finish the job. In multi-turn conversations and tool-call loops, return the complete assistant message unchanged, reasoning_content and tool_calls included; trimming it is how loops break. Vision input rejects public image URLs, so send base64 data or an ms://<file-id> reference from the Files API, with content as an array of objects.
Park web search for now. On K3.1 Pro it is mid-update, and the docs do not recommend it for production workflows in the near term. If your agent depends on search, keep that capability in your own retrieval layer until Kimi says the tool is ready.
client = OpenAI(
api_key=os.environ["MOONSHOT_API_KEY"],
base_url="https://api.moonshot.ai/v1",
)
completion = client.chat.completions.create(
model="kimi-k3.1-pro",
messages=[{"role": "user", "content": "Summarize the migration notes."}],
max_completion_tokens=8192,
reasoning_effort="high",
)Which model id should I pick?
Three ids cover most migrations. kimi-k3.1-pro is a post-trained Kimi K3 with substantially larger post-training compute, and it is the id the K2 retirement note points to. kimi-k3.1-pro-highspeed is the same model served at roughly two to three times the output speed, which is the one you want when an agent sits waiting on tokens. kimi-k3 has been on the API since July 2026 and stays the cheaper default when the 3.1 post-training buys you nothing.
Offline jobs can go through the Batch API on kimi-k3.1-pro and kimi-k3 at 60% of the standard rate. Batch cache hits are best effort rather than guaranteed, so do not design a batch pipeline around cache savings.
Vendor-published benchmark chart
Why do I get 404 or 429 right after switching?
A 404 carrying model_not_found is almost never a missing model. It is a missing base_url, which sends the call to OpenAI. A 401, a 404 or "permission denied" on a key that worked yesterday usually means the key belongs to a different product: Open Platform API keys and Kimi Code keys are not interchangeable. Kimi's own checklist runs: confirm the key matches the product, confirm the key's region matches the endpoint, check balance and voucher coverage, call GET /v1/models with that key to see the target model listed, match the model name to your integration path, then hunt stale environment variables, proxies and routing-tool configs.
A 429 is three errors wearing one status code, and error.type names the real one.
| error.type | Cause | What actually fixes it |
|---|---|---|
| engine_overloaded_error | Server-side capacity pressure | Wait for Retry-After, cut concurrency, back off exponentially. Topping up does not help. |
| rate_limit_reached_error | Organization concurrency, RPM, TPM or TPD limit | Lower request frequency, or raise your tier through top-up |
| exceeded_current_quota_error | Insufficient balance, overdue account, expired voucher | Check available_balance with the balance API and top up |
Two details matter for the bill. Requests interrupted by a 429 are not charged. And the OpenAI SDK retries certain errors two times by default, so one logical call can turn into three requests, each eating RPM quota; on a low tier a single unlucky call can consume the whole window.
What does the migration cost?
The Open Platform is pay as you go with no subscription, and it is a separate product from Kimi membership and Kimi Code. K3.1 Pro unlocks after a top-up of at least $1, and your cumulative top-up sets the account tier that sets concurrency, RPM, TPM and TPD.
Context caching needs no setup. Repeated request prefixes are cached automatically with a default TTL of five minutes, and on kimi-k3 the cache-hit price is one tenth of the cache-miss price. Two rules decide whether you benefit. The TTL locks at first write and holds until the entry fully expires, and the 5m and 1h caches do not share entries. A job that runs every ten minutes misses a 5m cache forever; write it with prompt_cache_options.ttl set to 1h and the same prefix starts paying the hit price.
Per-model rates are listed per million tokens on the pricing page and exclude taxes. That table renders in the browser, so read it live rather than trusting a cached screenshot or a blog post, this one included. File upload and extraction through the Files API are temporarily free, which makes the other piece of advice free to follow: stop base64-encoding documents. Base64 text inflates token counts badly, while Files API extraction is billed as ordinary input.
FAQ
Can I keep using Kimi K2 until the December cutoff?
Yes, if your account existed before October 31, 2026. Accounts registered after that date cannot reach K2 models at all. The series retires for everyone at the end of December, so plan the switch inside the remaining weeks.
Do I need a new API key for kimi-k3.1-pro?
Only if your current key is a Kimi Code key or belongs to another region. An Open Platform key keeps working with the new model ids.
Can I turn off thinking on Kimi K3.1 Pro?
No. K3.1 Pro always reasons. If the reasoning runs too long for your latency budget, set reasoning_effort to low.
Will my nightly job still hit the Kimi context cache?
Only if the gap between calls fits the TTL. A nightly gap exceeds the default five minutes, so write the cache with the 1h TTL from the start. Switching later means waiting for the old entry to expire completely.
If the December cutoff is pushing you to compare providers rather than just swap a model id, our Multi-Model Coding Plan page breaks down one shared allowance across DeepSeek, GLM, Kimi, Qwen and MiniMax.