Kimi K3.1 Pro API: first call, Codex setup, and the license terms still missing
How to call Kimi K3.1 Pro today: the five-step first request, the reasoning_effort values the docs list, a Codex config, and the open-weights license Moonshot has not published yet.
Nihar Rout · · Updated · 9 min read · 65 views
The Kimi K3.1 Pro API is live: point the OpenAI SDK at https://api.moonshot.ai/v1 and request the model kimi-k3.1-pro, so a first call is mostly a base-URL change. What Moonshot has not published is the license for the open weights it promises by November 4. We read every page below on October 25, 2026.
The Kimi K3.1 Pro API went live October 23, and the weights have not
Moonshot AI introduced Kimi K3.1 Pro on October 23 as the first model in its K3.1 series, with a 1-million-token context window. A faster variant, Kimi K3.1 Pro Highspeed, ships alongside it; the vendor says it runs 2-3x faster. Both are available in the Kimi app, Kimi Work, Kimi Code and the API.
The same post says "the full model weights will be released by Nov 4." That date is a promise, not a release. Moonshot's Hugging Face organization page, which we opened on October 25, lists Kimi-K3 but no K3.1 Pro entry, and Artificial Analysis currently labels the model proprietary because no weights are public.
Two practical facts before you write any code. The quickstart says K3.1 Pro is a flagship model that unlocks after a successful top-up, with a minimum of $1. And per the launch post, Kimi Enterprise administrators can enable it for an organization, but access is off by default.
Make your first Kimi K3.1 Pro API call in five steps
This follows the vendor's quickstart. We have not run it ourselves; every step below is the documented one.
- Top up your account by at least $1 on the Kimi API Platform, then create an API key under API Keys.
- Store the key in an environment variable named MOONSHOT_API_KEY rather than in your code.
- Install the OpenAI SDK, version 1.0 or later, on Python 3.9 or later. A Node.js 18+ route with the same SDK is documented too.
- Create the client with base_url set to https://api.moonshot.ai/v1 and your key read from the environment.
- Call chat.completions.create with model set to kimi-k3.1-pro and your messages. A normal text reply means you are connected.
The quickstart says the API also accepts the OpenAI Responses format and the Anthropic Messages format, which is why Codex and Claude Code can connect without a proxy. Billing is pay-as-you-go; the docs state there is no subscription plan for the API, which separates it from Kimi Code and the consumer membership.
Set reasoning_effort to low, high or max, and drop the sampling settings
K3.1 Pro always thinks. The docs answer the obvious question directly: you cannot turn chain-of-thought off, but you can set the top-level reasoning_effort field to low, high or max, and max is the default. The same page lists three limits worth knowing before you port code from another model:
- temperature, top_p, n, presence_penalty and frequency_penalty are fixed at 1.0, 0.95, 1, 0 and 0, so omit them from requests.
- max_completion_tokens defaults to 131,072 and can go up to 1,048,576.
- Vision input does not accept public image URLs. Send base64 data or an uploaded file reference, with content as an array of objects.
- In multi-turn chats and tool calls, send the complete assistant message back unchanged, not just its content field.
One source disagrees with the docs here. Simon Willison's launch post describes the three reasoning levels as low, medium and max. The quickstart lists low, high and max. We did not test whether medium is accepted, so use the documented values.
Because the default is the highest effort and Artificial Analysis calls the model very verbose, we'd start routine calls at low or high and move to max only for hard problems. That is our judgment, not a vendor recommendation. The evidence for the verbosity: Artificial Analysis says K3.1 Pro generated 150 million tokens running its Intelligence Index, against a median of 87 million for models in a similar price tier. It lists $2.00 per million input tokens and $10.00 per million output tokens, "based on Kimi's API." Moonshot's own pricing table did not render in the copy of the page we fetched, so check the live page before budgeting.
Point Codex at Kimi K3.1 Pro with one config block
Moonshot publishes a Codex guide that names kimi-k3.1-pro directly, which in our view makes it the most direct agent route today. The steps:
- Put the key in an environment variable called KIMI_API_KEY. The guide says not to write it into config.toml.
- Open ~/.codex/config.toml and set model to kimi-k3.1-pro and model_provider to kimi.
- Add a provider block with base_url https://api.moonshot.ai/v1, env_key KIMI_API_KEY and wire_api set to responses.
- Set model_context_window to 1048576. The guide says that without it Codex falls back to default model metadata, which can degrade performance.
- Restart Codex, confirm the model name, and send a simple message. In Codex Desktop the picker may show Custom even though requests use your configured model.
The guide's three troubleshooting cases map to three mistakes. A 401 means the key and base URL belong to different platforms, because keys from platform.kimi.ai only work with api.moonshot.ai. A 404 on /v1/responses means the base URL is wrong or still points at a local router. A 400 about search_context_size means a parameter Moonshot does not support yet. Codex also has no native video input channel, so use the API directly for video.
The Claude Code guide still names the older model
If you use Claude Code, read Moonshot's Claude Code guide closely before copying it. As published on October 25, its example settings block points ANTHROPIC_BASE_URL at https://api.moonshot.ai/anthropic but sets the main, Opus, Sonnet and Fable tiers to kimi-k3[1m], with the Haiku tier on kimi-k2.7-code. K3.1 Pro appears only in the guide's curl check.
So running K3.1 Pro in Claude Code means substituting model names yourself. We have not tested that, and the guide adds two warnings that apply. Setting only some tier variables makes the matching tasks fail silently, and values in the env block of settings.json override anything exported in your terminal. Check which model is active with /status after every change.
Moonshot's own pages disagree in places
Benchmarks first. On Terminal-Bench 4.0, Moonshot reports K3.1 Pro at 65.7%, ahead of GPT-6 Astra at 58.2% and narrowly behind Claude Opus 5.5 at 66.4%. These are the vendor's figures. Its footnotes say Kimi was run with the Claude Code harness and that competitors' scores are the maximum reported in their blog posts or on the official leaderboard, so the runs are not like for like.
The independent number is Artificial Analysis. It scores K3.1 Pro 55 on its Intelligence Index against a median of 27 for comparable models. According to Simon Willison, that sits above Claude Fable 5.1, GPT-6 Astra and Gemini 4 Argon at 53 and below Claude Opus 5.5 at 58. Artificial Analysis also puts output speed at 73 tokens per second, slower than its 82 average.
Then the docs. The launch post says the claim-level hallucination rate on Moonshot's internal Kimi Hallu Bench Hard fell from 23.4% for K3 to 8.3%. The quickstart page describes a different evaluation and reports 23.35% falling to 6.85%. And as of October 25 the quickstart's benchmark paragraph still carries unfilled placeholders, such as "[xx.x%]" where the Terminal-Bench score should be. We would treat the docs as a launch-week draft and the launch post as the more reliable of the two. Moonshot itself says the hallucination rates come from a stress test and do not represent overall error rates in daily use.
Is Kimi K3.1 Pro open source? Not yet, and the license is unpublished
The launch post calls K3.1 Pro "our most capable 3T-class open-weight model to date." We searched the raw text of that post and of the quickstart for a license name or terms and found none; the only license mentions on the quickstart are CC0 and CC BY-SA credits for example assets. As of October 25, we found no published license for K3.1 Pro.
The nearest precedent is the Kimi K3 License on Hugging Face. It grants broad permission to use, modify and sell, then adds conditions. It defines "Model as a Service" as giving a third party access to model inference or fine-tuning, for example via an API, in a way that lets them exercise meaningful control over inputs, parameters or training data. End-user products with model capabilities embedded in specific features, and mere relaying of requests to models hosted by others, are carved out. If a licensee or its affiliates operate such a business and their combined revenue exceeds 20 million US dollars over any consecutive 12 months, the licensee "must enter into a separate agreement with Moonshot AI" before using the software for any commercial purpose. Commercial products with more than 100 million monthly active users, or more than 20 million US dollars in monthly revenue, must display "Kimi K3" on the interface. Internal use, and use through Moonshot's official products or certified inference partners, is exempt from both.
We don't know whether K3.1 Pro will ship under the same terms. Treat the K3 text as an indication, not a promise. License documents change, so this reflects what we read on October 25, 2026; it is not legal advice. Read the license that ships with the weights, and take legal advice if a product or real revenue depends on it. The K3 License does not name a jurisdiction, and we have not assessed how it would apply in yours.
Who has to act now, and who can wait
Teams still on Kimi K2 models have a date. The pricing page says that from October 31, 2026, K2 series models stop being available to newly registered users, existing users are not affected, and Moonshot plans to retire all K2 models by the end of December 2026. Test your prompts on K3.1 Pro before then.
If you want a hosted model for coding agents, the API route above is ready. In our view, if you planned to self-host, wait for the weights and their license. If you plan to sell raw model access to third parties, we'd wait most of all, because the Model as a Service clause in the K3 text is where a larger business would be affected.
To compare options, Upfynd lists 157 products in LLMs & AI Infrastructure and 121 in AI Coding Tools as of October 25, 2026. Moonshot's assistant is listed as Kimi, and Hugging Face is where Moonshot published the K3 weights. Moonshot's benchmark footnotes also compare against DeepSeek, listed here too. If you build developer tools, you can submit your product for free.
Frequently asked questions
Is Kimi K3.1 Pro open source?
Not yet. Moonshot calls it an open-weight model and promises the full weights by November 4, 2026, but as of October 25 no weights are public and we found no license for K3.1 Pro on the launch post or quickstart. Its earlier K3 model uses a custom Kimi K3 License.
When will the Kimi K3.1 Pro weights be released?
Moonshot's launch post says the full model weights will be released by November 4, 2026. That is a vendor promise as of October 25, not a release. Check Moonshot's Hugging Face page, where it published the Kimi K3 weights, and read the license that ships with them.
What is the Kimi K3.1 Pro model ID?
The API model ID is kimi-k3.1-pro, and the faster variant is kimi-k3.1-pro-highspeed. Use them with the base URL https://api.moonshot.ai/v1 through the OpenAI SDK. A top-up of at least $1 is required before the flagship model unlocks on your account, per Moonshot's quickstart.
Can I turn off thinking in Kimi K3.1 Pro?
No. Moonshot's quickstart says K3.1 Pro always thinks. You can lower the cost and latency by setting the top-level reasoning_effort field to low, high or max, with max as the default. Sampling settings such as temperature and top_p are fixed, so leave them out of requests.
How do I use Kimi K3.1 Pro in Codex?
Set a KIMI_API_KEY environment variable, then edit ~/.codex/config.toml with model kimi-k3.1-pro, a provider using base URL https://api.moonshot.ai/v1 and wire_api responses, plus a 1,048,576 context window. Restart Codex and send a test message, following Moonshot's Codex guide. A 401 error usually means the key and base URL belong to different platforms.
Products in this article
About the author
Nihar Rout
CEO & Co-founder