
Kimi AI is the model family from Moonshot AI, and in 2026 it has become one of the few open-weight lines that developers seriously compare against Claude and GPT for coding agents and long-context work. This guide covers what a developer or CTO actually needs: which Kimi models exist right now, what the license lets you do with the weights, how the API works with the OpenAI and Anthropic SDKs, what it costs, how it plugs into Claude Code and Codex, and when it is the right call versus Claude, GPT, DeepSeek or Qwen.
Key takeaways
- Kimi AI is Moonshot AI’s model family, and its flagship Kimi K3.1 Pro is a 2.8-trillion-parameter mixture-of-experts model with a 1M-token context and downloadable open weights.
- The Kimi API supports OpenAI-compatible Chat Completions and Responses APIs plus an Anthropic-compatible Messages API, so switching often needs only a new base URL, key and model ID.
- As of November 2026, Kimi K3.1 Pro costs USD 2 per million input tokens and USD 10 per million output tokens, and Batch API work bills at 60 percent.
- Moonshot plans to retire all K2 series models from its API by the end of December 2026, so teams that prototyped on K2.6 or K2.7 Code should budget a migration to K3.
- The hosted Kimi API is governed by Singapore law and may use content to improve services unless agreed otherwise, so US companies should review data terms or self-host the weights.
As of November 11, 2026. Facts and prices come from Moonshot’s own model cards, license files and platform docs; prices change, so recheck before you budget.
Short answer: Kimi K3.1 Pro is Moonshot’s current flagship, a 2.8-trillion-parameter mixture-of-experts model with a 1M-token context window and downloadable weights under a mostly permissive MIT-style license. Its API speaks both the OpenAI and Anthropic formats and is listed at USD 2 per million input tokens and USD 10 per million output tokens as of November 2026. It is a strong fit for cost-sensitive agentic coding and self-hosting, but US teams should run a vendor and data-residency review first because the hosted API is operated from Singapore.
What Is Kimi AI and Which Models Can Developers Use Now?
Moonshot AI ships Kimi as three things that are easy to confuse: a consumer chat product at kimi.com and in mobile apps, a coding product called Kimi Code, and a pay-as-you-go developer API on the Kimi Open Platform at platform.kimi.ai. The same models sit underneath, but billing, terms and endpoints differ. The API is pay-as-you-go and separate from Kimi membership and Kimi Code.
The current lineup
- Kimi K3.1 Pro (API id kimi-k3.1-pro): the first model in the K3.1 series, post-trained from Kimi K3. Per its model card it is a mixture-of-experts model with 2.8T total parameters, 104B activated per token, 896 experts (16 selected plus 2 shared), a 401M-parameter vision encoder and a 1,048,576-token context. It takes text and image input.
- Kimi K3.1 Pro Highspeed (kimi-k3.1-pro-highspeed): same capabilities, which Moonshot says runs about 2 to 3 times faster, at a higher price.
- Kimi K3 (kimi-k3): the earlier 2.8T base of the K3 series, natively multimodal across text, images and video, also with a 1M context.
- Kimi K2.7 Code and K2.6: 1T total and 32B active parameters with a 256K context. K2.7 Code is tuned for coding agents.
The K2 retirement you should plan for
Moonshot’s pricing page states that K2 series models stopped being available to newly registered API users on October 31, 2026, and that it plans to retire all K2 models by the end of December 2026. If you prototyped on K2.6 or K2.7 Code earlier this year, budget a migration to the K3 series now. Context grows to 1M tokens, but per-token prices rise, so rerun your cost model.
One more practical detail from the K3.1 Pro model card: reasoning depth is set with a top-level reasoning_effort field (low, high or max, default max). For multi-turn chats and tool calls, you must pass the full assistant message back unchanged, including reasoning_content and tool_calls. Frameworks that strip reasoning fields between turns quietly degrade results.
Are Kimi Models Open-Weight, and What Does the License Allow?
Yes. Moonshot publishes weights on Hugging Face under the moonshotai organization. The Kimi K3.1 Pro repository was created on November 2, 2026, and the announcement promised full weights by November 4. The repository is not gated, so you can pull it without an approval form. The checkpoint ships in MXFP4 weights, and the card lists vLLM, SGLang and TokenSpeed as recommended engines, with Transformers, Docker Model Runner and GGUF quantizations for llama.cpp, Ollama and LM Studio also referenced.
What the Kimi K3.1-Pro License says
The license starts as a standard MIT-style grant: use, copy, modify, fine-tune, distribute and sell, with the copyright notice kept. Then it adds conditions that matter to some businesses:
- Model as a Service clause: if you or your affiliates run a business that gives third parties meaningful control over model inputs, parameters or training data (for example, a raw inference API), and combined revenue exceeds USD 20 million over any consecutive 12 months, you need a separate agreement with Moonshot before commercial use. The license explicitly excludes end-user products where the model is embedded in specific features, and simple relaying to models hosted by others.
- Attribution clause: products with more than 100 million monthly active users or more than USD 20 million in monthly revenue must prominently display ‘Kimi K3.1-Pro’ in the user interface.
- Exemptions: neither condition applies to internal use (nothing exposed to third parties) or to use through Moonshot’s official products or certified inference partners.
How that compares to older Kimi licenses
K2.6 and K2.7 Code use a ‘Modified MIT’ license whose only addition is the same 100M MAU or USD 20M monthly revenue display rule. The K3 and K3.1 licenses add the Model as a Service clause. Most SaaS teams building features on the model will not hit either threshold. If your business model is reselling inference, have counsel read the definitions closely, because ‘meaningful control’ is the line that decides which side you land on.

How Do You Call the Kimi AI API With OpenAI or Anthropic SDKs?
The Kimi Open Platform exposes three API surfaces; pick the one that matches your SDK:
- Chat Completions API, OpenAI-compatible, usable with the OpenAI Python or Node.js SDK (version 1.0 or later).
- Responses API, also OpenAI-compatible, for text or JSON output, function tools and server-side web search.
- Messages API, Anthropic-compatible, for the Anthropic SDK and tools such as Claude Code.
The minimal switch
With the OpenAI SDK, the quickstart sets base_url to https://api.moonshot.ai/v1, reads the key from a MOONSHOT_API_KEY environment variable, and calls model kimi-k3.1-pro. For the Anthropic format, the base URL is https://api.moonshot.ai/anthropic. If you are wiring a model into a product for the first time, our guide to integrating AI into an existing web application covers the surrounding architecture.
Features worth knowing before you build
The model card and quickstart list vision input, structured output, partial mode, tool choice, dynamic tool loading and context caching. Context caching is switched on automatically for repeated request prefixes with a default five-minute TTL, and a one-hour tier is available. For agent loops that resend a long system prompt and tool schema on every turn, caching is the single biggest cost lever. The console adds per-project budgets, rate limits, an IP whitelist and an Admin API with audit logs. Rate limits are tiered by cumulative recharge and return HTTP 429 with X-RateLimit headers, so build backoff in from day one.
How Much Does the Kimi API Cost?
Moonshot publishes per-token USD pricing on its platform, excluding taxes. These are the figures as of November 2026, per million tokens:
| Model | Input | Output | Cached input | Context |
|---|---|---|---|---|
| kimi-k3.1-pro | USD 2.00 | USD 10.00 | USD 0.20 | 1M |
| kimi-k3.1-pro-highspeed | USD 4.00 | USD 20.00 | USD 0.20 | 1M |
| kimi-k3 | USD 3.00 | USD 15.00 | USD 0.30 | 1M |
| kimi-k2.7-code | USD 0.95 | USD 4.00 | USD 0.19 | 256K |
| kimi-k2.6 | USD 0.95 | USD 4.00 | USD 0.16 | 256K |
The details that change the bill
For the K3 series, cache writes are billed separately: on K3.1 Pro a five-minute write costs USD 2.00 per million tokens and a one-hour write USD 4.00, while hits are billed at the cached rate only. The Batch API bills kimi-k3.1-pro and kimi-k3 at 60 percent of standard price for work that does not need a real-time response, such as overnight code review, test generation or document extraction. K3.1 Pro is also listed cheaper than K3.
How to model cost for an agent
Coding agents are output-heavy and loop many times. Estimate tokens per task from a week of real logs, then split them into cached prefix, fresh input and output. At max reasoning effort, reasoning tokens add to output, so measure with the effort level you will ship. Price the same workload on Claude and GPT from their current pricing pages; the ratio depends on cache hit rate and verbosity.
Can You Use Kimi With Claude Code, Codex or Cursor?
Moonshot documents Claude Code and Codex setups directly, and its benchmark notes show it evaluates Kimi inside Claude Code as well as its own Kimi Code CLI.
Claude Code
Moonshot’s guide sets ANTHROPIC_BASE_URL to https://api.moonshot.ai/anthropic and ANTHROPIC_AUTH_TOKEN to your Kimi key in the env block of ~/.claude/settings.json. The important warning is that Claude Code uses several model tiers: the main model, the Opus, Sonnet, Haiku and Fable tier variables, and CLAUDE_CODE_SUBAGENT_MODEL. If you map only the main model, background summarization or sub-agent calls request a model name Kimi does not recognize and fail silently. The guide also recommends an auto-compact window of 1,000,000 tokens and max effort, and notes that kimi-k2.7-code requires thinking to be on. Since the settings file stores the key in plain text, keep it out of git. For how Claude Code itself compares with other assistants, see our Claude Code vs GitHub Copilot breakdown.
Codex, Kimi Code and Cursor-style tools
For OpenAI’s Codex, Moonshot says its native Responses API means no proxy is needed: set wire_api to responses, base_url to https://api.moonshot.ai/v1 and model to kimi-k3.1-pro in ~/.codex/config.toml. Moonshot’s own Kimi Code CLI is the harness its K2 model cards say works best. Kimi Code’s docs also describe a separate coding endpoint for Claude Code and Roo Code tied to a Kimi Code membership key. We found no first-party Moonshot documentation for Cursor. Any editor that accepts a custom OpenAI-compatible base URL can in principle point at the Chat Completions endpoint, but check that tool’s own docs for which features (agent mode, tab completion) honor custom providers. Our Codex CLI vs Cursor comparison explains how those harnesses differ.

When Should You Choose Kimi Over Claude, GPT, DeepSeek or Qwen?
Moonshot reports K3.1 Pro at 65.7 percent on Terminal-Bench 4.0, ahead of GPT-6 Astra at 58.2 percent and just behind Claude Opus 5.5 at 66.4 percent. It trails badly elsewhere, for example Program Bench at 31.5 against 65.0 for Claude Opus 5.5. These are vendor-reported, so test on your own tasks.
| Option | Weights | License | Best reason to pick it |
|---|---|---|---|
| Kimi K3.1 Pro | Open | MIT-style plus MaaS and display conditions | Frontier-class agentic coding at lower API list prices, with a self-host path |
| Claude (Anthropic) | Closed | Commercial terms | Top-tier coding agents, mature US enterprise contracts and controls |
| GPT (OpenAI) | Closed | Commercial terms | Broad ecosystem, Codex harness, wide cloud availability |
| DeepSeek V4.1 Flash | Open | MIT | Cleanest license and a much smaller active parameter count to serve |
| Qwen family | Open (most models) | Varies by model, some Apache 2.0 | Many sizes, including models small enough for modest GPU budgets |
Choose Kimi when
You need long-context agent work over large repos or document sets, you want an exit to self-hosting without retraining your prompts, and your API spend is large enough that list price differences matter. It also makes a cheap-to-wire second provider behind a Claude- or GPT-first stack.
Choose something else when
Pick Claude or GPT if procurement requires a US-contracted vendor with established enterprise agreements, or if your evaluations show a clear quality gap on your tasks. Pick DeepSeek or a Qwen model if you want to self-host on less hardware: K3.1 Pro activates 104B parameters per token across 2.8T total, which is a multi-GPU data center deployment, while the Qwen3.8-27B card describes a 27B dense model under Apache 2.0. For closed-model choices, our Grok vs Gemini guide uses the same task-first approach.
What Data Residency and Vendor-Risk Questions Should a US Company Ask?
This section is not legal advice. It is a checklist of what Moonshot’s own documents say, and the questions a US company should put to counsel and its security team before sending production data to the hosted API.
What the documents say
The Kimi Open Platform terms are an agreement with Moonshot AI Pte. Ltd., governed by the laws of Singapore. The platform privacy policy says collected information is stored on servers located in Singapore and may be transferred outside your country. The terms say Moonshot may use customer content to provide and improve its services, and that customers who need restrictions on training use should contact Moonshot for enterprise arrangements; unless agreed in writing, content may be used for those purposes. Separately, Moonshot offers Zero Data Retention to enterprise customers on request, under which prompts and responses are deleted once returned, and its ZDR page says enterprise customer data is not used for training by default. ZDR excludes the Batch API, images and videos uploaded through the File Upload API, operational data such as security and billing logs, and third-party connectors or plugins.
Questions for counsel and security review
- Does our data classification allow customer or source-code data to be processed and stored in Singapore, and do any customer contracts restrict offshore processing?
- Do we qualify as an enterprise customer for ZDR and a written no-training commitment, and does the signed agreement override the default terms?
- Do any federal, state or industry obligations, or customer questionnaires, ask about the ownership or jurisdiction of AI vendors, and how do we answer for this one?
- What happens to our workloads if the service is restricted, repriced or a model is retired, as K2 is being retired now?
- If we self-host the open weights instead, does that resolve the data questions, and who reviews the license conditions for our business model?
Self-hosting on your own US cloud account, or using a US inference provider listed on the model card, is often the cleanest answer to residency concerns, at the cost of running GPUs yourself or adding another vendor review.
What This Means If You Build Software
Model choice is now a configuration decision if you architect for it, and a rewrite if you do not.
Build a provider layer
Put every model call behind one internal interface that handles base URL, key, model id, reasoning effort, retries and logging. One OpenAI-style adapter covers Kimi, DeepSeek and many hosted open models. Keep quirks like passing reasoning_content back on tool turns inside that adapter.
Own your evaluations and logs
Keep 50 to 200 real tasks from your product with pass and fail criteria, and run every candidate model against them before switching. Log prompts, outputs, token counts and costs on your side; Moonshot notes that with ZDR on it cannot trace individual requests later, so your logs become the only record.
This is the kind of work an offshore team can do well and economically. Lycore builds AI features into web and mobile products at USD 25 per hour, or on a fixed project price or monthly retainer, and LevelUp, an AI study app in our Our Work portfolio, shows the kind of grounded AI product we design and ship.
Pros and Cons of Kimi AI for Developers
Pros
- Open weights for a frontier-scale model, with an MIT-style base license and no gating on Hugging Face.
- OpenAI-compatible and Anthropic-compatible endpoints, plus documented Claude Code and Codex setups.
- 1M-token context across the K3 series, automatic context caching and a 40 percent batch discount.
- Published USD per-token pricing and console governance tools such as project budgets, IP whitelists and audit logs.
Cons
- Hosted API is operated from Singapore under Singapore law, which triggers extra vendor review for many US buyers.
- Default terms allow content use for service improvement unless you negotiate otherwise; ZDR is enterprise-only and has exclusions.
- Self-hosting a 2.8T-parameter model requires serious multi-GPU infrastructure.
- Fast model churn: K2.6 appeared on Hugging Face in April 2026 and the K2 series is scheduled to leave the API by the end of December 2026, so plan for regular migrations.
Frequently Asked Questions
Is Kimi AI free to use for developers?
The weights are free to download and use under the Kimi K3.1-Pro License, so self-hosting has no license fee unless you hit the Model as a Service threshold of USD 20 million in trailing 12-month revenue, in which case you need a separate agreement. You still pay for the GPUs. The hosted API is pay-as-you-go with no subscription: as of November 2026, K3.1 Pro is USD 2 per million input tokens and USD 10 per million output tokens, and a minimum USD 1 recharge is required to start. Batch jobs on K3.1 Pro run at 60 percent of the standard rate, and cached input is billed at USD 0.20 per million tokens.
Can I use Kimi with the OpenAI SDK without changing my code?
Mostly. Moonshot’s quickstart uses the standard OpenAI SDK with base_url set to https://api.moonshot.ai/v1 and model set to kimi-k3.1-pro, so basic chat calls need only configuration changes. Differences appear in advanced features. Reasoning is controlled with a reasoning_effort field, and for multi-turn tool use you must return the full assistant message, including reasoning_content, unchanged. Moonshot also documents structured output, tool choice and context caching with its own parameters. Before switching production traffic, run your existing test suite against Kimi, compare outputs and token usage with your current provider, and keep provider-specific handling in one adapter layer so the rest of your code stays provider-neutral.
Does Kimi train on my API data?
Moonshot’s documents need to be read together. The platform terms say customer content may be used to provide and improve the services unless otherwise agreed in writing, and invite customers needing training restrictions to arrange enterprise terms. The Zero Data Retention page says enterprise customer data is not used for training by default and that ZDR, available on request to enterprise customers, deletes prompts and responses after each response, with exclusions for batch jobs, directly uploaded images and videos, operational logs and third-party connectors. If training use matters to you, get a written commitment in your contract and have counsel confirm which document governs.
What hardware do I need to self-host Kimi K3.1 Pro?
Moonshot’s model card names inference engines rather than minimum hardware: vLLM, SGLang and TokenSpeed are recommended, with GGUF quantizations referenced for llama.cpp, Ollama and LM Studio. The model has 2.8 trillion total parameters and 104 billion active per token, and ships in MXFP4 weights, so plan on at least one multi-GPU data center node rather than a single workstation or developer laptop, and check the vLLM or SGLang recipes for current configurations. Until your volume is high and steady, the Kimi API or a hosted inference provider listed on the model card is usually cheaper than running and staffing your own GPU cluster.
The Bottom Line
Kimi K3.1 Pro gives developers a rare combination: open weights at frontier scale, an API that drops into OpenAI and Anthropic tooling including Claude Code and Codex, a 1M-token context and published pricing that undercuts the earlier K3. The trade-offs are vendor jurisdiction, default data terms, heavy self-hosting requirements and fast release cycles. Treat it as a strong candidate in a multi-provider architecture: evaluate it on your own tasks, route data according to a counsel-approved policy, and keep the switch cost low so the next model change is a config edit.
Building AI features or coding agents into your product? Talk to Lycore about model selection, provider layers and evaluation, or see our AI development services.



