Kimi API Docs — Official Cost, Models and Plans 2026
Quick Answer
The Kimi API is Moonshot AI's developer API giving access to the Kimi K2.5 and K2 language models. Pricing starts at $0.14 per million input tokens for K2, with K2.5 at $1.40 per million tokens. The API is OpenAI-compatible, meaning existing OpenAI integrations work with minimal code changes. Free-tier access is available through Nvidia's API Catalog with generous monthly limits.
What is Kimi API
Kimi API is the developer interface provided by Moonshot AI, a leading Chinese AI company, to access their Kimi series of large language models. Unlike many AI APIs that require complex setup, the kimi ai api is designed to be OpenAI-compatible from day one — meaning any application already using OpenAI's chat completions endpoint can switch to Kimi with a single line change.
The API currently offers two primary model families: Kimi K2.5 (the flagship model with 128K context window and superior reasoning capabilities) and Kimi K2 (a cost-effective model for simpler tasks). Both models support chat completions, code generation, function calling, and vision inputs.
| Feature | Kimi K2.5 | Kimi K2 |
|---|---|---|
| Context Window | 131,072 tokens (128K) | 131,072 tokens (128K) |
| Input Price (per 1M tokens) | $1.40 | $0.14 |
| Output Price (per 1M tokens) | $4.20 | $0.42 |
| Vision Support | Yes | No |
| Thinking Mode | Yes | Yes |
| OpenAI Compatible | Yes | Yes |
| Free Tier | Available | Available |
Kimi API Models Compared
Moonshot AI offers multiple kimi api model variants optimized for different use cases. The K2.5 model excels at complex reasoning, coding, and long-context tasks, while K2 provides an affordable option for high-volume, simpler applications. Both models support the same OpenAI-compatible endpoint format.
For developers who need advanced reasoning capabilities, the kimi k2 thinking api and kimi k2.5 thinking api variants provide step-by-step chain-of-thought reasoning at slightly higher latency but significantly improved accuracy on complex problems.
Kimi API vs OpenAI vs Anthropic vs Gemini
How does kimi api pricing compare to the major competitors? The following table shows a side-by-side comparison of pricing, context windows, and key capabilities across the leading AI API providers.
| Provider | Model | Input (per 1M tokens) | Output (per 1M tokens) | Context Window |
|---|---|---|---|---|
| Kimi API | K2.5 | $1.40 | $4.20 | 128K |
| Kimi API | K2 | $0.14 | $0.42 | 128K |
| OpenAI | GPT-4o | $2.50 | $10.00 | 128K |
| Anthropic | Claude Sonnet 4 | $3.00 | $15.00 | 200K |
| Gemini 2.5 Pro | $1.25 | $10.00 | 1M |
How to Get Started with Kimi API
Getting started with the kimi api takes under 5 minutes. Follow these steps to make your first API call:
- Create an account at platform.moonshot.cn
- Generate an API key from your dashboard — see our complete API key guide
- Install the OpenAI SDK (
pip install openaifor Python) - Set the base URL to
https://api.moonshot.cn/v1and make your first call - Explore models — start with K2 for testing, upgrade to K2.5 for production
For detailed code examples in Python, JavaScript, and cURL, visit our Kimi API Code Integration guide.
Which Kimi Model Should I Use
Choosing the right kimi api model depends on your use case and budget:
- Kimi K2.5 — Best for complex reasoning, coding, vision tasks, and production workloads where quality matters most
- Kimi K2 — Best for high-volume, cost-sensitive applications like chatbots, content generation, and simple Q&A
- K2.5 Thinking — Best for math, logic puzzles, and multi-step reasoning where accuracy is critical
- K2 via Nvidia — Best for developers who want free access with no credit card required
Is Kimi API Free
Yes, kimi api offers multiple free access options. New accounts on Moonshot's platform receive free credits upon registration. Additionally, Nvidia's API Catalog provides free access to Kimi K2.5 through Nvidia NIM with generous rate limits and no credit card required. For full details on free tier limits and how to maximize your free usage, see our Free Kimi API Access guide.
Explore Kimi API Documentation
API Documentation
Complete reference for K2.5 and K2 models, endpoints, parameters, and authentication.
Read more →Pricing & Plans
All Kimi API model costs compared, including free tier limits and Nvidia free access.
Read more →Getting Started
Step-by-step guides to get your API key, install SDKs, and make your first call.
Read more →Models & Features
Compare Kimi models including K2 Thinking, K2.5, and Moonshot API variants.
Read more →Frequently Asked Questions About Kimi API
What is Kimi API?
Kimi API is Moonshot AI's developer API that provides access to the Kimi K2.5 and K2 large language models. It is OpenAI-compatible, meaning existing OpenAI SDK integrations work with minimal code changes. The API supports chat completions, code generation, long-context reasoning, and vision tasks.
How much does Kimi API cost per million tokens?
Kimi API pricing starts at approximately $0.14 per million input tokens for the K2 model and $1.40 per million input tokens for K2.5. Output tokens are priced higher. Free tier credits are available for new accounts, and Nvidia provides free access to K2.5 through its API Catalog.
Is Kimi API free to use?
Kimi API offers a free tier with limited tokens per month for new developer accounts. Additionally, Nvidia's API Catalog provides free access to Kimi K2.5 through Nvidia NIM with no credit card required. Paid plans begin after free tier limits are reached.
How do I get a Kimi API key?
Visit platform.moonshot.cn and create an account. After email verification, navigate to the API Keys section in your dashboard, click Generate New Key, and copy your key immediately. The kimi api key is shown only once. Store it securely in your environment variables.
Is Kimi API compatible with OpenAI SDKs?
Yes. Kimi API is fully OpenAI-compatible. You can use the official OpenAI Python or JavaScript SDK by changing the base_url to Kimi's endpoint. This makes migration from OpenAI to Kimi API straightforward with minimal code changes.
What is the context window for Kimi K2.5?
Kimi K2.5 supports a context window of up to 131,072 tokens (128K), making it one of the largest context windows available among commercial LLM APIs. This is ideal for processing long documents, codebases, and multi-turn conversations.
Which Kimi model should I use for coding?
Kimi K2.5 is recommended for coding tasks due to its superior code generation and understanding capabilities. It outperforms many competitors on coding benchmarks including HumanEval and MBPP. For simpler tasks, K2 offers a more cost-effective alternative.
Can I access Kimi API through Nvidia?
Yes. Nvidia hosts Kimi K2.5 on its API Catalog through Nvidia NIM. Developers can access the model for free with generous rate limits and no credit card required. This is one of the easiest ways to start using Kimi API without any cost.
Summary
The kimi api is one of the most competitive AI APIs available in 2026, offering GPT-4-class performance at significantly lower prices with a generous free tier. Whether you're building a chatbot, coding assistant, or document analysis tool, Kimi's OpenAI-compatible API makes integration straightforward. Start with our Getting Started guide or explore pricing details to find the right plan for your project.