Kimi API Pricing

What does the Kimi (Moonshot AI) API cost?

Moonshot AI bills the Kimi API strictly on a pay-as-you-go basis per 1,000,000 tokens (1 MTok) consumed, with no monthly subscription required for model inference. The current flagship K3 series models handle a context window of up to 1,048,576 tokens, while non-real-time Batch API workloads run at 60% of the standard inference rate.

If you are building against the Kimi platform, you only pay for the exact input and output tokens your requests process, plus cache writes when you reuse prefixes. You do not have to buy a seat license to call the models, but you do need to understand how context caching, document extraction, and the deprecation of older K2 models impact your invoice.

How Kimi API billing works

The Kimi API platform at platform.kimi.ai calculates your charges based on token usage. A token is the basic unit of text processed by the model, and for typical English text, 1 token works out to roughly 3 to 4 characters. When you review the pricing sheets in the developer console, all rates are quoted per MTok, where 1 MTok equals 1,000,000 tokens.

Model inference APIs charge for both input tokens and output tokens. The pricing structure is pay-as-you-go: you sign up, create an API key, top up your account balance, and draw down against that balance as your apps make requests. If you run a larger operation that requires custom terms, Moonshot AI also offers enterprise plans through a sales contact form on their product plans page.

All listed API model prices exclude applicable taxes. Specific tax obligations depend on your local tax regulations, and the platform calculates and adds those taxes during checkout when you add funds.

It is easy to mix up the developer platform with Moonshot AI's consumer software, but their billing systems do not touch each other:

  • Kimi API Platform: Pure pay-as-you-go billing for developers calling inference endpoints with an API key.
  • Kimi Code: An independent developer tool with its own API, billed on a subscription basis that covers desktop, terminal, and IDE environments. The Kimi Code API and the platform API are not interchangeable.
  • Kimi Membership: Consumer accounts offering four subscription tiers billed monthly or annually.
  • Kimi Business: Team accounts billed through an annual subscription.

Paying for a Kimi membership or a Kimi Code subscription gives you zero credit on the API platform. They are separate products with separate ledgers.

Model tiers and context limits

Moonshot AI documents four main models on its platform: Kimi K3.1 Pro, Kimi K3, Kimi K2.7 Code, and Kimi K2.6. These fall into two distinct architectural generations, each with very different context limits and availability rules.

The newer K3 series models give you a massive context window of 1,048,576 tokens. That is large enough to drop entire codebases or lengthy technical books directly into the prompt without breaking them up. The older K2 series models top out at 262,144 tokens.

If you are a new developer setting up an account today, the older generation is already off the table. Starting October 31, 2026, K2 series models are no longer available to newly registered users, though existing accounts can still query them temporarily. Moonshot AI plans to retire all K2 series models by the end of December 2026, so any production code still pointing at K2 endpoints must be migrated to K3 models before the year ends.

ModelContext window (tokens)Batch API inferenceModel status
Kimi K3.1 Pro1,048,576Supported (billed at 60% of standard price)Active (K3 series)
Kimi K31,048,576Supported (billed at 60% of standard price)Active (K3 series)
Kimi K2.7 Code262,144Not supportedDeprecating (retires end of Dec 2026)
Kimi K2.6262,144Not supportedDeprecating (retires end of Dec 2026)

Context caching, document extraction, and batch jobs

Long context windows can run up costs quickly if you re-send the same background text on every turn. To handle this, the Kimi API automatically enables context caching billing for repeated request prefixes on K3 series models, using a default time-to-live (TTL) of 5 minutes. You do not need to flip a manual header switch to take advantage of it.

For K3 series models, cache writes are billed separately depending on the TTL tier you choose, which can be 5 minutes (5min) or 1 hour (1h). Once a prefix is written to cache, subsequent calls that hit that cache are billed strictly at the cache-hit input price. You do not pay an additional cache write fee on hits. If your workload repeatedly queries documentation or a standard system prompt, keeping requests within the TTL window significantly cuts down your input token bill.

If your application extracts text from uploaded files, the platform divides the operation into two billing components:

  1. File operations: File-related APIs, which cover file storage and file content extraction, are temporarily free. Uploading a document and extracting its raw text does not trigger any file API fees.
  2. Inference consumption: Once you pass that extracted text into a model prompt, the extracted content is billed as standard model token usage.

For high-volume processing where you do not need an immediate response, you can save money by using the Batch API. The models kimi-k3.1-pro and kimi-k3 support batch inference for large-scale tasks, and Moonshot AI bills these asynchronous jobs at 60% of the standard price. That represents a flat 40% discount for data pipelines, offline evaluations, or overnight processing runs.

A worked token calculation example

Because Kimi invoices are calculated strictly per 1,000,000 tokens (1 MTok), small requests cost tiny fractions of a cent, but large context payloads scale linearly.

How many tokens are in your prompt?

Instead of estimating manually, developers can call the Kimi Token Calculation API before submitting a workload to retrieve the exact token count of each API call. This is helpful for validating user-submitted files before they run through an expensive model call.

Consider a practical pipeline processing a 150,000-character technical report:

  • At roughly 3 to 4 characters per token for typical English text, that document translates to approximately 40,000 to 50,000 input tokens.
  • Uploading the document and extracting the text costs nothing on the file API side, since file storage and content extraction APIs are temporarily free.
  • If you pass the 50,000 tokens of extracted content into Kimi K3.1 Pro alongside a 2,000-token prompt and generate 1,000 output tokens, your invoice registers 52,000 input tokens and 1,000 output tokens against your balance.
  • If you run that identical analysis across 200 documents overnight using the Batch API, you process 10.4 MTok of input and 0.2 MTok of output. Because batch runs on kimi-k3.1-pro are billed at 60% of the standard price, you pay only 60% of what an equivalent real-time endpoint run would have cost.

If you also evaluate competitors in this space, you can compare how these token economics stack up against alternative providers in our guide to What does the DeepSeek API cost?.

Checking your balance and preventing overages

Kimi API usage draws down your account balance, so the balance is the number to watch. You can check it in the Kimi platform console or with GET /v1/users/me/balance.

Keeping an eye on consumption across multiple AI vendors can become a chore, especially when different providers meter tokens on different schedules. If you want unified visibility across your infrastructure, Costbrake monitors spend across 23 cloud, AI and SaaS providers, including Moonshot AI, AWS, Google Cloud, Azure, OpenAI, Anthropic, and DeepSeek.

For Moonshot AI, Costbrake tracks your consumption or prepaid balance on the international platform (platform.kimi.ai, which is billed in USD). Note that keys from the China platform (platform.kimi.com), which are billed in CNY, are rejected.

Connecting your Kimi account takes two steps in the Moonshot AI dashboard:

  1. Open Organization > Admin API Keys, create a key with only the billing:read permission, and paste it into Costbrake. Admin keys are currently in beta and require a verified organization (under Organization > Organization Verification). Because an Admin key with billing:read cannot call models, it is completely read-only.
  2. If your account does not have an Admin API Keys page, you can paste a regular API key from the standard API Keys section instead. A standard key reads your balance, but keep in mind that it can also call models.

Using an Admin key gives you cleaner data. With an Admin key, Costbrake tracks spend based on the change in the total consumed counter, so mid-cycle wallet top-ups never hide your usage, and spend between checks is spread evenly across those hours. With a regular key, Costbrake only inspects the remaining balance, meaning a top-up between two checks can mask the spend that occurred in that window.

Costbrake runs checks hourly on the Free plan, every 5 minutes on Pro and Team, and every 2 minutes if an active spending spike is detected. A spike alert fires if an hour costs more than 3x the usual baseline (calculated from the last 7 days) and is at least $5 higher than normal. You can also configure automated budget thresholds (at 50%, 80%, and 100%), forecast alerts based on the pace of the last 72 hours, and new-charge notifications when a service exceeds $1.

Costbrake does not offer a killswitch brake for Moonshot AI yet, but it keeps your team from getting blindsided by sudden token spikes. You can connect your accounts manually at https://app.costbrake.com/signin or pass the job to your coding assistant via agent setup. You can see all features and plan limits on the Costbrake pricing page, or read our broader walkthrough on How do I monitor spend across OpenAI, Anthropic, Gemini and other AI APIs in one place?.

Questions and answers

Is the Kimi API free to use?

The Kimi API model inference platform is not free; it bills input and output tokens on a pay-as-you-go basis per MTok. However, file-related APIs for document upload, content extraction, and file storage are temporarily free.

How do I check my Kimi API balance?

You can view your current credit balance and usage history by logging into the Moonshot AI Open Platform console at platform.kimi.ai. If you have a verified organization, you can also generate an Admin API key with billing:read permissions to inspect consumption metrics programmatically.

What is the difference between Kimi K3 and K2 models?

K3 series models support a context window of 1,048,576 tokens, automatic context caching, and 60% pricing for batch inference on supported models. Older K2 series models only support a 262,144-token context, are closed to new users as of October 31, 2026, and will be retired completely by the end of December 2026.

How does Kimi context caching billing work?

Context caching is automatically enabled for repeated prompt prefixes on K3 models, with a default TTL of 5 minutes. You pay a separate cache write fee based on your chosen TTL tier (5 minutes or 1 hour), after which subsequent cache hits are billed at the discounted cache-hit input price without additional write fees.

Does my Kimi membership cover API usage?

No, personal Kimi memberships, Kimi Business subscriptions, and Kimi Code subscriptions are completely independent products. API model inference requires its own pay-as-you-go balance on platform.kimi.ai.

Sources

Updated