Kimi API Key and Pricing: Set Up K3 and Estimate Your Costs
執筆:Nicho
この記事は英語版のみ公開しています。
To use Kimi K3 through an API, choose an access provider first. That choice determines where you create the key, which endpoint you call, and whose billing and limits apply. A key from Kimi's official platform and a CheapAIModel key are not interchangeable.
This guide focuses on K3 access and cost planning. Prices and documentation were checked on October 26, 2026. The examples are calculations from published rates, not measured coding benchmarks or a claim that every integration has been tested.
Signing up from outside mainland China? See how to use the Kimi API internationally for sign-up, payment methods and rate-limit tiers.
Choose the right place to create your API key
For direct access, use the official Kimi API-key console. Its K3 quickstart specifies the OpenAI-format base URL https://api.moonshot.ai/v1 and model identifier kimi-k3.
For CheapAIModel access, create your key in the CheapAIModel console, then use the gateway's base URL https://api.cheapaimodel.ai/v1 and the kimi-k3 identifier shown on its model page.
| Access route | Key issuer | OpenAI-format base URL | Model ID |
|---|---|---|---|
| Official Kimi API | Kimi API Platform | https://api.moonshot.ai/v1 | kimi-k3 |
| CheapAIModel | CheapAIModel | https://api.cheapaimodel.ai/v1 | kimi-k3 |
Matching model names do not establish identical feature support, limits, or deployment revisions. Keep the provider, key, endpoint, and model together as one configuration. Never paste an official-platform key into an unrelated service just because it offers the same model.
Store credentials in your application's secret manager or environment variables. Keep them out of source control, screenshots, shared workflow exports, and support messages.
Kimi API pricing: read the billing categories
The CheapAIModel price page lists these K3 rates in US dollars per million tokens:
| Category | Displayed gateway rate |
|---|---|
| Input | $2.093511 |
| Output | $10.467555 |
| Cache read | $0.209351 |
These are gateway prices, not a statement of every provider's current price. Check the selected provider's rate card before funding an account or comparing routes. CheapAIModel advertises prepaid billing with no subscription and top-ups from $5; review its refund terms before adding funds.
For official access, the Kimi billing guide distinguishes API usage from Kimi membership and Kimi Code. A consumer or coding subscription should not be treated as general-purpose API credit. The K3 quickstart currently says access unlocks after a successful top-up of at least $1. That is an access requirement, not the cost of a request or evidence of a recurring free allowance.
A worked budget example
Suppose a workload uses 10 million uncached input tokens and 2 million output tokens. Applying the displayed CheapAIModel input and output rates gives:
10 × $2.093511 + 2 × $10.467555 = $41.870220
Rounded at the end, that is a $41.87 input/output subtotal. A smaller workload of 100,000 input and 20,000 output tokens gives approximately $0.42 under the same assumptions.
These figures exclude cache-write charges, tools, taxes where applicable, and other separately billed services. They also exclude retries beyond the stated token totals. They do not predict how many bugs you can fix or documents you can process. For that, measure usage and successful outcomes from your own application.
Cache reads and cache writes are different
The official Kimi API automatically caches eligible repeated prefixes for K3. Its documentation describes a default five-minute lifetime and a one-hour option. Cache writes have their own TTL-dependent billing, while a cache hit uses the cached-input rate without another write charge. See the official billing explanation.
That distinction matters for a coding agent that resends repository context. A low read rate can help when context is reused, but a long pause, a changed prefix, or repeated writes can change the result. Do not assume an 80% hit rate just because most of two prompts looks similar.
When comparing a gateway with direct access, check how each route classifies writes, misses, and hits. Do not import one provider's TTL rules into another provider's invoice. Ask for the gateway's current cache-accounting rules and inspect actual usage before treating a cached-input calculation as a complete bill.
Keep cached and uncached token counts mutually exclusive. Adding cache-hit tokens to an input total that already includes them would double-count input in your estimate.
K2, K2.5, and K3 are not interchangeable names
If you arrived looking for Kimi K2 or K2.5, identify the exact model required by your application before following a K3 guide. Do not change an old model string to kimi-k3 and assume identical output, context limits, or tool behavior.
K3 is also not the newest official Kimi model: the current official K3 documentation identifies it as a previous-generation model alongside newer options. Its presence on CheapAIModel does not imply that every newer official model is available through the gateway.
The official pricing notice says K2-series access will close to newly registered users on October 31, 2026, with retirement planned for the end of December. These are announced direct-platform plans, not a guarantee of another provider's schedule. Recheck the notice if you depend on an older model, then test a replacement before changing production traffic.
Connect your coding tool without assuming full compatibility
First check which protocol your tool expects. An OpenAI-style client and an Anthropic Messages client do not use the same endpoint configuration.
For a tool with a documented custom OpenAI-compatible provider, configure the selected service's key, base URL, and model ID. Check whether it supports the operations you need, including streaming, tool calls, structured output, and context handling. A successful plain-text reply alone does not verify an agent's full workflow.
For direct Kimi access through Claude Code, use Kimi's current Claude Code guide. It describes an Anthropic-compatible endpoint and settings for different model roles. Those instructions do not establish that the same configuration works on CheapAIModel. Avoid mixing endpoint instructions from one provider with a key from another.
After configuration, run a small, non-sensitive task with an explicit acceptance criterion. Confirm the selected provider and model, review reported token usage, inspect the charge, and test the tool features your application needs. This article documents the checks to perform; it does not claim that we ran a paid end-to-end integration test.
If the first request fails
- Authentication error: verify the key issuer, destination hostname, and active configuration. Check for a stale environment variable overriding the new value. Do not expose the key while collecting logs.
- Model not found: use an identifier supported by that endpoint, not a display name or a model available only through another provider.
- Balance or access problem: inspect the account's access requirements and available balance. Do not assume an error code has the same meaning across services.
- Rate limit: check the applicable account and model limits, reduce concurrency, and follow the provider's retry guidance rather than immediately repeating requests.
Once a small request works, compare your measured input, output, and cache usage with the estimate. Use the current Kimi model page for the gateway's published configuration, or the broader API price comparison if you are still choosing a model.