Kimi says its K2 API models stopped being available to newly registered users on October 31, 2026, and are planned for retirement by the end of December 2026. Existing users should inventory their K2 calls, select a currently available replacement and test real workloads before switching. Changing the model ID is only the first step: reasoning settings, tools, output format, latency, token use and application costs can all affect the result. Check the official Kimi notice for the latest schedule.
Documentation checked: November 7, 2026. The date is a planned vendor schedule, not a guarantee. This guide covers the direct Kimi API; Kimi Code subscriptions and third-party gateways have their own configuration and terms. We did not run a live migration or paid requests for this article.
1. Find every place that calls K2
Search configuration, environment variables, background jobs, SDK wrappers and agent settings for K2 model IDs. Record the provider and endpoint alongside each ID: the same model name may be routed through a gateway with different behavior. For each workload, capture the API format, input types, tool definitions, structured-output requirements, latency target and budget.
| Workload | What to record before changing it | What to compare after migration |
|---|---|---|
| Chat or extraction | System prompt, expected response shape and output limit. | Answer accuracy, schema validity and user-visible latency. |
| Coding agent | Available tools, repository fixture, completion criteria and retry limit. | Tests passed, tool failures, total time and cost per completed task. |
| Long documents | Input size, source documents and questions with known answers. | Correctness and citations at the beginning, middle and end of the documents. |
| Batch processing | Daily volume, service tier, error handling and delivery deadline. | Success rate, unit cost, throughput and partial-failure recovery. |
Avoid putting customer prompts or secrets into a shared test set without the appropriate permissions. Synthetic or approved examples are enough for an initial regression suite.
2. Choose a replacement by workload
Kimi's quickstart lists kimi-k3.1-pro and kimi-k3.1-pro-highspeed as current direct API model IDs. Select a model your account can use and read its current model guide and price table. The high-speed variant is a separate model choice; check its price and limits before using it as a fallback.
Kimi's pricing documentation lists a 262,144-token context window for K2 series models and 1,048,576 tokens for K3 series models. A larger limit can make a longer request possible; it does not prove reliable recall over the entire context or lower cost. Check the API and model's actual input/output limits and test the longest inputs you expect to send.
3. Review request parameters instead of copying them blindly
For K3.1 Pro, Kimi's quickstart documents the top-level reasoning_effort values low, high and max, with max as the documented default. Check whether your SDK and chosen API format send the field correctly and whether your application can tolerate the default. Do not assume that a K2 setting, a gateway-specific parameter or a Kimi Code option has the same effect on K3.1. See the model guide for current restrictions.
Before release, test:
- Non-streaming and streaming responses, including errors and incomplete streams.
- JSON or schema validation with the exact parser used in production.
- Tool-call arguments, tool results and multi-step recovery with safe test tools.
- Output-token limits, reasoning configuration and any parameters that your integration already sends.
- Images, video or other inputs only if your actual workflow uses them and the selected model supports them.
Do not use a production tool that sends messages, changes customer data or makes purchases in a migration test. Replace it with a mock or a safely isolated environment.
4. Make a small direct API test
Kimi's direct API quickstart uses the following base URL and model ID. Set the key in your environment and check account access and pricing first. This example is based on the official documentation and has not been executed for this guide.
export MOONSHOT_API_KEY='YOUR_KIMI_API_KEY'
curl https://api.moonshot.ai/v1/chat/completions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $MOONSHOT_API_KEY" \
-d '{"model":"kimi-k3.1-pro","messages":[{"role":"user","content":"Summarize the migration checklist in one sentence."}]}'
A successful result should contain an assistant message. Record the selected model, settings, response status, latency and reported usage. Start with a small request; a real API call can incur charges. If the model is not available, check the account, exact ID and current official model list before changing the application.
5. Compare task cost, not just token price
Run a representative, permissioned test set against the old and new model while the old route remains available. Score task success and formatting, and record input tokens, output tokens, cache usage, latency, retries and any tool fees. Divide the total cost of all attempts, including failures, by the number of successful tasks. Report the failure rate separately; if there are no successes, cost per successful task cannot be calculated.
Kimi says K3-series cache writes and cache hits can be billed differently, with rules based on cache lifetime. Check the current pricing and cache notes and account terms before extrapolating. A change in prompt length, reasoning effort or tool loops can outweigh the difference in displayed input price.
6. Roll out with a real rollback plan
Keep the model selection configurable, start with a small share of eligible requests, and monitor quality, errors, latency and spend. Define the conditions that pause the rollout before shifting traffic. A rollback to K2 is only a temporary option while the provider and account still allow K2 calls; it is not a dependable recovery plan after retirement. Identify and test another supported route if continuity requires one.
For a third-party gateway, separately verify its enabled model IDs, data terms, parameters, limits and prices. An OpenAI-compatible interface does not guarantee that every optional parameter behaves identically across providers. Check the SmarToken model catalog rather than assuming Kimi is currently offered there.
FAQ
When will Kimi K2 API access end?
Kimi's notice says it plans to retire K2 series models by the end of December 2026. New registrations lost access starting October 31, while existing registered users were not affected by that initial restriction. Confirm any schedule changes on the official notice.
Can I just replace the K2 model name with K3.1 Pro?
The model field is a necessary change, but it is not sufficient evidence of compatibility. Test the request parameters, tool calls, output format, latency and costs in your actual integration before sending production traffic.
Does the API retirement mean K2.6 weights are unavailable?
The API notice concerns Kimi's hosted service. The K2.6 model card separately describes published weights and a modified MIT license. Check the current files and license before deciding to self-host.
Is Kimi Code the same as the Kimi API?
No. Kimi describes its API as pay-as-you-go and distinguishes it from Kimi membership and Kimi Code. Check the terms of the specific product you use.
Sources and method
This guide uses Kimi's public pricing notice, quickstart, model guide and K2.6 model card, reviewed November 7, 2026. It is a documentation-based checklist; we did not run a live API migration, reproduce benchmarks or make paid calls.