TL;DR
Every price, limit, and model name below was checked against platform.kimi.ai on September 14, 2026. kimi-k3 launched July 16, 2026.
“the service address. /v1 speaks both OpenAI Chat Completions and OpenAI Responses; /anthropic speaks Anthropic Messages. Auth is a bearer key from platform.kimi.ai, and Kimi K3 unlocks after a $1 top-up.”
The Kimi API runs three protocols on one host. The flagship kimi-k3 has 2.8T parameters, a 1,048,576-token context, native vision, and thinking you cannot switch off, at $3/$15 per M tokens with $0.30 cache hits, flat at any context length. kimi-k2.7-code and kimi-k2.6 sit at $0.95/$4.00 with 262,144 context; kimi-k2.7-code-highspeed is $1.90/$8.00 at roughly 180 output tokens per second. Those two K2 models batch at 60% of list. K3 does not. kimi-k2.5 and every moonshot-v1 model were retired on August 31, 2026 and return 404 now. Rate limits are set by cumulative recharge, from 3 requests per minute at Tier 0 to 300 at Tier 5, and they apply per organization rather than per key. Claude Code needs the bracketed alias kimi-k3[1m]; every other client uses the plain name. The weights have been public on Hugging Face since July 27, 2026, so the first-party API is now one of seventeen ways to buy this model and not the cheapest. For the model itself, see the Kimi K3 deep dive.
How to call it
OpenAI SDK with base_url=https://api.moonshot.ai/v1 and model=kimi-k3. Anthropic SDK and Claude Code with base_url=https://api.moonshot.ai/anthropic and the alias kimi-k3[1m]. Codex uses the Responses API at /v1/responses. Streaming splits reasoning_content from content; structured JSON, tool calling, and vision all work.
What bites people
429 is three different errors wearing one status code, and only error.type tells them apart. Non-streaming requests get an HTML 504 from the gateway after 900 seconds. Open Platform keys and Kimi Code subscription keys are not interchangeable and mixing them returns 401 or 404.
Kimi API Quick Start: Get an API Key and Make a First Call
Moonshot's quickstart, checked September 28, 2026, gets you from signup to a first kimi-k3 response in four steps. The API follows the OpenAI format, so the official OpenAI SDK is the client.
- Sign in to the Kimi API Platform at
platform.kimi.aiand top up at least $1, which unlocks Kimi K3 and puts you on Tier 0. - Open API Keys in the console, create a key, and copy it.
- Store it in an environment variable instead of in code:
export MOONSHOT_API_KEY="YOUR_KIMI_API_KEY". - Install the OpenAI SDK, version 1.0.0 or later, on Python 3.8+ or Node.js 18+, and set
base_urltohttps://api.moonshot.ai/v1.
pip install --upgrade 'openai>=1.0' # Python
npm install openai@latest # Node.js
curl https://api.moonshot.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MOONSHOT_API_KEY" \
-d '{
"model": "kimi-k3",
"messages": [{"role": "user", "content": "What is 1+1?"}],
"reasoning_effort": "low"
}'Swap the model field to kimi-k2.7-code-highspeed for faster coding output or kimi-k2.6 for general multimodal work. Parameter support differs by model, so a request built for K2.x needs its thinking block removed before it goes to K3.
| Parameter | What it does | Notes |
|---|---|---|
| model | kimi-k3, kimi-k2.7-code, kimi-k2.7-code-highspeed, kimi-k2.6 | GET /v1/models lists what your key can call |
| messages | Conversation history; content is a string or a text/image_url/video_url array | The API is stateless, so resend history every turn |
| reasoning_effort | K3 reasoning depth: low, high, or max | Defaults to max; K3 always reasons |
| max_completion_tokens | Output cap | Rate limits count it before generation starts |
| stream | Server-sent events as tokens are generated | Use it on long calls to avoid gateway timeouts |
| response_format | JSON Mode or JSON Schema structured output | Supported on K3 |
| tools / tool_choice | Function calling; tool_choice forces, allows, or blocks calls | tool_choice is new in K3 |
Sources: Kimi API quickstart, Chat Completions API reference, reasoning-effort guide, and the Kimi K3 pricing page on platform.kimi.ai, fetched September 28, 2026. For multi-turn and tool calls on K3, send the full assistant message back unchanged, including reasoning_content and tool_calls.
The Full Kimi API Model List
Four models are callable as of September 14, 2026. Everything else in the Moonshot catalogue has been retired and returns 404.
| Model | Input | Cached input | Output | Context |
|---|---|---|---|---|
| kimi-k3 | $3.00 | $0.30 | $15.00 | 1,048,576 |
| kimi-k2.7-code | $0.95 | $0.19 | $4.00 | 262,144 |
| kimi-k2.7-code-highspeed | $1.90 | $0.38 | $8.00 | 262,144 |
| kimi-k2.6 | $0.95 | $0.16 | $4.00 | 262,144 |
Source: Moonshot model inference pricing page, checked September 14, 2026. Billing is pay-as-you-go with no long-context surcharge, so K3 costs $3/M whether the request carries 4K tokens or 900K. The highspeed variant's input rate is now published ($1.90/M) after months of only appearing in the console.
| Model | Batch input | Batch cached input | Batch output |
|---|---|---|---|
| kimi-k2.7-code (Batch) | $0.57 | $0.114 | $2.40 |
| kimi-k2.6 (Batch) | $0.57 | $0.10 | $2.40 |
| kimi-k3 | Not supported | Not supported | Not supported |
Moonshot's BatchJob pricing page prices batch inference at 60% of the standard rate and lists exactly two supported models, kimi-k2.7-code and kimi-k2.6. Batch jobs are exempt from real-time concurrency limits but expire if they miss their completion_window. The flagship has no batch tier, so bulk K3 work pays full interactive price.
kimi-k2.7-code-highspeed is the coding model tuned for latency: 262,144 context, roughly 180 output tokens per second and up to 260 on short contexts, about six times standard kimi-k2.7-code. It costs exactly double the standard tier on every axis: $1.90 in, $0.38 cached, $8.00 out. It is the right pick for interactive agent loops where time-to-first-edit dominates, and the wrong one for bulk work, where the Batch API at $0.57/$2.40 is four times cheaper than the standard tier and fourteen times cheaper than highspeed on output.
Moonshot's platform changelog records that kimi-k2.5 and the entire moonshot-v1 generation, including -vision-preview and moonshot-v1-auto, were retired across all platforms at 16:00 on August 31, 2026. Calls to those names now return a 404 model-not-found error rather than degrading to a newer model.
Earlier retirements: the original kimi-k2 series on May 25, 2026, and kimi-latest on January 28, 2026. Target a supported model by explicit name. There is no working "latest" alias on this platform.
The open weights outlive the endpoint. OpenRouter still routes moonshotai/kimi-k2.5 and moonshotai/kimi-k2-thinking to third-party hosts serving the released checkpoints, two weeks after Moonshot's own API stopped answering for them (checked September 14, 2026).
Base URL, API Key, and Auth
The service address is https://api.moonshot.ai. The base URL you pass to an SDK depends on which protocol that SDK speaks.
| Protocol | base_url | Endpoint |
|---|---|---|
| OpenAI Chat Completions | https://api.moonshot.ai/v1 | /chat/completions |
| OpenAI Responses | https://api.moonshot.ai/v1 | /responses |
| Anthropic Messages | https://api.moonshot.ai/anthropic | /v1/messages |
Source: Moonshot API overview, checked September 14, 2026. The same key works across all three. Utility endpoints live under /v1 regardless: GET /v1/models lists what your account can actually call, GET /v1/users/me/balance returns available balance, and POST /v1/tokenizers/estimate-token-count counts an input before you send it.
Three steps to a working key: sign up at platform.kimi.ai (the console and docs moved there from platform.moonshot.ai; the API host is unchanged), top up, and create a key in the console. Moonshot's troubleshooting page states the gate plainly: Kimi K3 is unlocked after a successful top-up with a $1 minimum, and cumulative top-up also sets your rate-limit tier. You can test a prompt in the platform Playground before paying anything.
Moonshot sells three separate things and their keys do not interoperate. The Open Platform (platform.kimi.ai) is pay-as-you-go API access. Kimi Code is a subscription coding product with its own keys. Kimi Membership is the consumer subscription. Balances do not convert in any direction, and using a key from one product against another's endpoint returns 401 or 404.
Keys are also isolated per regional platform: a key issued on platform.kimi.ai returns 401 against another regional Kimi platform. If you get a 401 that looks impossible, call GET /v1/models with the same key and check whether your target model is in the returned list. Organizations can additionally enforce an IP allowlist, which surfaces as a 403 reading "Your IP is not allowed to access this organization."
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.moonshot.ai/v1",
api_key=os.environ["MOONSHOT_API_KEY"],
max_retries=0, # see the 429 section: SDK auto-retry amplifies one call into many
)
resp = client.chat.completions.create(
model="kimi-k3",
messages=[
{"role": "user", "content": "Trace this race condition and propose a fix."},
],
reasoning_effort="high", # low | high | max; max is the default and the priciest
max_completion_tokens=8192,
stream=True, # non-streaming calls get an HTML 504 at the 900-second gateway timeout
)Two things to settle before you build on the hosted API. First, data residency. Moonshot is a Beijing company and publishes no per-region processing map for api.moonshot.ai, so treat it as processing outside the EU and US unless you have something in writing. Zero Data Retention is available to enterprise customers on request and deletes prompts and responses once the response returns, but it explicitly cannot be guaranteed for images and videos submitted through direct file uploads, and it removes Moonshot's ability to trace an individual request for you later.
Second, the weights are out. Kimi K3 shipped on Hugging Face on July 27, 2026 under the Kimi K3 License as a native MXFP4 checkpoint, so the flagship is no longer hosted-API-only. Self-hosting or buying K3 from a provider in your own jurisdiction are both real options now, which is the subject of the routes section below.
kimi-k3: The Flagship
kimi-k3 launched July 16, 2026: 2.8 trillion total parameters, a 1M-token context window, native vision (images and video), and thinking always on. It is built on Kimi Delta Attention, a hybrid linear-attention mechanism that interleaves linear and full-attention layers in a 3:1 ratio, cutting KV-cache memory by up to 75% at long context, which is why the 1M window is priced flat rather than tiered. Moonshot reports 81.2 on FrontierSWE and 88.3 on Terminal-Bench 2.1. The weights followed on July 27, 2026 on Hugging Face under the Kimi K3 License. The full breakdown, including independent scores and local-run hardware floors, is on the Kimi K3 deep dive.
API-relevant specifics, from the Chat Completions reference checked September 14, 2026: max_completion_tokens defaults to 131,072 and goes up to 1,048,576; streaming exposes reasoning_content and content as separate deltas; structured JSON output with a strict schema, tool calling with dynamic loading, and a prefix-continuation partial mode are all supported. Context caching is automatic, with no cache ID, TTL, or extra parameter to manage, so the way to earn the $0.30 rate is to keep the system prompt and tool definitions byte-stable across calls.
One correction worth making if you read K3 coverage from July. reasoning_effort is no longer max-only. It now accepts low, high, and max, with max still the default. Thinking itself still cannot be disabled. Moonshot's troubleshooting page answers the question directly: you cannot turn off K3's chain of thought, and the remedy for slow reasoning is reasoning_effort="low". Since the default is the most expensive setting, a client that never sets the field pays maximum reasoning on trivial calls.
The Rate-Limit Tiers
Kimi enforces four limits at once: concurrency (simultaneous requests), RPM (requests per minute), TPM (tokens per minute), and TPD (tokens per day). Your tier is set by cumulative top-up, not a subscription: the more you have recharged over the account's lifetime, the higher every limit. The 429 error messages name these limits as organization-level, so issuing extra API keys or extra projects under one organization adds no headroom.
| Tier | Cumulative top-up | Concurrency | RPM | TPM | TPD |
|---|---|---|---|---|---|
| Tier 0 | $1 | 1 | 3 | 500,000 | 1,500,000 |
| Tier 1 | $10 | 15 | 100 | 2,000,000 | Unlimited |
| Tier 2 | $20 | 40 | 100 | 3,000,000 | Unlimited |
| Tier 3 | $100 | 50 | 200 | 3,000,000 | Unlimited |
| Tier 4 | $1,000 | 60 | 200 | 4,000,000 | Unlimited |
| Tier 5 | $3,000 | 100 | 300 | 5,000,000 | Unlimited |
Source: Moonshot recharge and rate-limiting page, checked September 14, 2026. The two cliffs worth knowing: Tier 0 is 1 concurrent request and 3 RPM, which is a smoke-test allowance and not a workload, and the daily token cap disappears entirely at Tier 1. After that the curve is shallow. Going from $10 to $3,000 of lifetime spend buys 3x the RPM and 2.5x the TPM, not an order of magnitude. Teams that need more than Tier 5 have to ask Moonshot for capacity rather than spend their way up.
Moonshot's rate-limit documentation used to state that the limiter counts request tokens plus max_completion_tokens rather than tokens actually generated, so a request that set max_completion_tokens=131072 booked 133K tokens against TPM even when the answer ran 200 tokens. That sentence is not on the page as of September 14, 2026, and we could not confirm the behavior still holds. It was last documented in July 2026. Treat it as a reason to set max_completion_tokens to what you expect rather than to the ceiling, not as a current guarantee.
What is still documented is the adjacent 400: "prompt tokens + max_tokens exceeds the model specification." That one is a context-window check, not a rate-limit check, and the fix is the same.
OpenAI vs Anthropic-Compatible Endpoints
Moonshot now runs three compatible surfaces over the same models, not two:
- OpenAI Chat Completions at
https://api.moonshot.ai/v1, endpoint/chat/completions. Streaming, tool calling, structured output. Point the OpenAI SDK'sbase_urlhere and pass a Moonshot key; existing OpenAI-shaped code runs unchanged. LangChain, Dify, and Coze are named as working third-party clients. - OpenAI Responses at the same
https://api.moonshot.ai/v1, endpoint/responses. This is the surface Codex talks to, and Moonshot ships a Codex integration guide that configures~/.codex/config.tomlagainst it. - Anthropic Messages at
https://api.moonshot.ai/anthropic, endpoint/v1/messages. This is what Claude Code and Anthropic-SDK-shaped clients talk to. Same models, Messages wire format.
Whatever SDK your agent already uses, one of the three matches its wire format, and the same key authenticates all three. Two Kimi extensions do not fit the OpenAI schema cleanly and trip people up in exactly the same way each time. The thinking parameter has to be passed through the SDK's extra_body, and partial is a field set on an assistant message inside the messages array ("partial": true), not a top-level request parameter.
The model name is not portable across the three either. Moonshot's troubleshooting checklist spells it out: direct API calls and Codex use kimi-k3, while Claude Code uses the compatible alias kimi-k3[1m]. Sending kimi-k3[1m] straight at /v1/chat/completions is a 404, and it is the first thing to check when a working curl and a broken IDE disagree.
Claude Code and Cline Setup
Moonshot's current Claude Code guide has grown well past the two environment variables the July version needed. It now configures the model for every Claude alias slot, and it warns that omitting any one of these makes the corresponding feature fail silently. Put them in ~/.claude/settings.json under env:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.moonshot.ai/anthropic",
"ANTHROPIC_AUTH_TOKEN": "YOUR_MOONSHOT_API_KEY",
"ANTHROPIC_MODEL": "kimi-k3[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "kimi-k3[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k3[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "kimi-k2.7-code",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "kimi-k3[1m]",
"CLAUDE_CODE_SUBAGENT_MODEL": "kimi-k3[1m]",
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
"CLAUDE_CODE_EFFORT_LEVEL": "max"
}
}Three details changed since the launch-day instructions. The auth variable is ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY. The model string is the bracketed alias kimi-k3[1m], which is Claude-Code-only and 404s if you send it to the OpenAI endpoint. And the compaction window is 1000000 rather than the exact 1,048,576 context, which leaves headroom so compaction fires before a length error does.
Claude Code's /model menu is a fixed list of Claude aliases and will not show Kimi models, so confirm the swap took effect with /status rather than the model picker, then send one real message to validate the chain end to end. kimi-k3 thinks by default. The cheaper kimi-k2.7-code in the Haiku slot needs thinking mode toggled on explicitly with Option+T on macOS or Alt+T elsewhere.
For Cline, RooCode, OpenCode, and similar OpenAI-SDK-based agents, select Moonshot as the provider (or a custom OpenAI-compatible provider), set the base URL to https://api.moonshot.ai/v1, paste your Moonshot key, and choose the model by its plain name (kimi-k3 or kimi-k2.7-code) with no bracket suffix. Set reasoning_effort deliberately: an agent loop that fires hundreds of small calls pays max-effort reasoning on every one of them at the default.
Moonshot's documented triage for third-party agents is to split the chain in two. Call the API directly with the same key, endpoint, and model name. If the direct call fails, it is balance, auth, model permission, or a bad parameter. If the direct call succeeds and the tool still fails, the bug is in the tool's protocol conversion, streaming handling, timeouts, or automatic retries, and the docs name CC Switch and Trae as unmaintained third-party routers worth clearing stale config out of first.
Related and counterintuitive: a client showing no result does not mean you were not billed. If a coding tool stops waiting early or a proxy disconnects, the server-side request can still complete and produce a call record. Check the request_id and the usage field rather than the screen.
Kimi Code CLI: Install, Login, and API Keys
Moonshot ships its own terminal agent. Kimi Code CLI is MIT-licensed, at 7,374 GitHub stars, and shipping fast: version 0.43.0 landed September 14, 2026, the fifth release in twelve days. It reads and edits code, runs shell commands, searches files, and fetches web pages. Install it without Node:
# macOS / Linux
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
# Windows (PowerShell). Needs Git for Windows; Git Bash is the shell
irm https://code.kimi.com/kimi-code/install.ps1 | iex
kimi # start in your project directory
/login # then pick "Kimi Platform (API key · platform.kimi.ai)"The install script verifies a checksum and puts kimi on your PATH. On first launch /login offers two paths, Kimi Code OAuth or an Open Platform API key, and the platform you select must match where the key was created or validation fails. If Git Bash is installed somewhere non-standard on Windows, point KIMI_SHELL_PATH at bash.exe.
Choosing OAuth bills against a Kimi Code subscription with rolling 5-hour and 7-day quota windows. Choosing an Open Platform key bills per token against your prepaid balance. They are different products with different meters and non-interchangeable keys, which is the single most common source of confusing 401s and 403s in the CLI's issue tracker.
A concrete example: issue #3014, filed August 17, 2026 and still open, reports a subscription account locked out with "403 You've reached your usage limit" while the web dashboard showed 0% of both the 5-hour and weekly windows used. The usage history showed 100 records of failed Login Device calls from the CLI, each returning 403, and each apparently consuming quota. Repeated login retries were burning the budget they were failing to authenticate against.
Common Errors: The 429 Trap
HTTP 429 covers three unrelated conditions on this API, and the status code alone tells you nothing. Moonshot's error reference resolves the ambiguity with error.type in the response body. Read that field first.
| error.type | What went wrong | What actually fixes it |
|---|---|---|
| engine_overloaded_error | The serving node is under load, typically peak-hour capacity pressure | Back off per Retry-After with exponential backoff. Topping up or upgrading your tier does not help |
| rate_limit_reached_error | An organization-level concurrency, RPM, TPM, or TPD ceiling was hit | Reduce concurrency or request rate, or raise your tier by topping up |
| exceeded_current_quota_error | Insufficient balance, a disabled or overdue account, or an expired voucher | Check GET /v1/users/me/balance and top up |
Source: Moonshot common error codes and troubleshooting pages, checked September 14, 2026. Note the middle column: every rate-limit message is worded "Organization-level ... limit reached," which is how you can tell that splitting traffic across more API keys inside one organization buys nothing.
Two things soften the blow. Requests interrupted by a 429 are not charged. And the retry amplification is documented rather than folklore: Moonshot notes that clients such as the OpenAI SDK retry automatically by default, so one logical operation becomes several requests that each consume rate-limit quota. On Tier 0, where the ceiling is 3 requests per minute, a single default-retry storm is the whole minute.
- Read
error.typebefore changing anything. Backing off fixes one of the three cases and does nothing for the other two. - Cap SDK retries (
max_retries=0, or a small number with your own backoff). The default auto-retry is what turns a blip into a lockout. - Top up to raise your tier: $10 removes the 1.5M-TPD cap and takes you from 3 RPM to 100.
- Check the balance.
exceeded_current_quota_erroris a funding problem wearing a rate-limit status code. - Reduce concurrency to your tier's ceiling. Adding API keys does not help, since the limits are organization-level.
504 after 900 seconds. The gateway gives up on a request that has produced no response for fifteen minutes and returns an HTML timeout page rather than JSON, which parses as garbage in most clients. Long non-streaming K3 calls hit this. Set stream: true.
499 client_closed_request. The client disconnected before the server finished. Usually an intermediate proxy cutting a stream, or a local timeout. Check KeepAlive settings before blaming Moonshot.
400 content_filter. Input or output tripped content safety review. This is a distinct failure from a malformed request, and error.type separates them.
Request Signature: Proving You Got the Model You Paid For
Kimi K3 is resold widely, at varying quantizations, by hosts with varying incentives. Moonshot shipped a cryptographic answer to that, and it is the least-discussed endpoint on the platform. Send a random nonce as X-Msh-Request-Nonce on any Chat Completions, Responses, or Messages call. The response comes back with two extra headers, Msh-Request-Timestamp and a Msh-Request-Signature token prefixed reqsigv1_. Post the nonce, timestamp, model, and signature to https://api.moonshot.ai/v1/signatures/verify and you get back {"valid": true} only if all three match.
What that proves: the Kimi API itself accepted that request for that exact model at that exact millisecond, rather than a proxy quietly substituting a cheaper model. It works on streaming and non-streaming requests alike. Anyone holding the four values can verify it, so a service can show the proof to its own users or to an auditor.
What it does not prove, per Moonshot's own caveats: that the request succeeded, or that the response was complete. The server does not record nonces, so replaying the same four parameters still returns valid: true. Replay protection and validity windows are the caller's job. Use a fresh UUID v4 per request and store the timestamp alongside it if the proof needs to mean anything later.
The Token Economics of Always-On Thinking
kimi-k3's $3/$15 reads mid-tier until you account for how it generates. Thinking cannot be disabled, and the default reasoning_effort is max, so a client that never sets the field pays for a full reasoning trace at $15/M output on every call including the trivial ones. This is the same effect that makes cheap-per-token reasoning models expensive per task: GLM-5.2 burns tens of thousands of output tokens per hard task at max effort. The difference since July is that K3 now gives you a dial. Setting reasoning_effort="low" on classification, routing, and summarization calls is the single largest lever on a K3 bill, and it costs one line.
The flat 1M-context pricing is the genuine differentiator. Anthropic charges a premium above 200K input tokens and Google tiers Gemini pricing by context length (see Gemini API pricing); Moonshot charges $3/M whether you send 4K or 900K tokens. For long-context workloads (repo-scale analysis, long agent traces, document piles) that flatness moves the calculus more than the headline rate.
An issue filed against Moonshot's own CLI on August 5, 2026 and still open reports that agent reliability drops sharply once a session's context fill passes roughly 500K tokens, an operator-measured threshold rather than a documented one. Below that fill the same workflows ran for hours. Above it the reporter observed loop capture (the agent repeating a verify-diagnose cycle without changing strategy and not recovering), instruction drift where explicit standing constraints lose force, and stale-state trust where the agent re-derives state from its own compaction summary instead of re-reading the files.
That matters for the economics because the flat 1M rate invites you to push context rather than manage it. Half the advertised window looks like the practical ceiling for agentic work, and the tokens you spend past it are both billed and, by this report, counterproductive.
If the workload is high-volume codegen where per-task cost dominates rather than context length, the K2 models are the pragmatic choice on the Kimi API. kimi-k2.7-code at $0.95/$4.00 with a $0.19/M cache-hit rate is a fraction of K3's output cost, and the Batch API drops it to $0.57/$2.40 for anything that does not need an answer this second. That batch rate is 6.25x cheaper than K3's output price, and K3 cannot reach it at all.
OpenRouter and Other Access Routes
Since the weights opened on July 27, the first-party API stopped being the cheapest way to buy K3. Pulling OpenRouter's endpoint list for moonshotai/kimi-k3 on September 14, 2026 returns 20 endpoints from 17 providers, all at the full 1,048,576 context. Moonshot's own endpoint sits at $3.00/$15.00, tied for the most expensive of the mainstream hosts. Eight endpoints undercut it.
| Provider | Input | Output | Quantization |
|---|---|---|---|
| InferenceNet | $2.10 | $10.95 | unlisted |
| Relace | $2.40 | $12.00 | fp4 |
| DigitalOcean | $2.55 | $12.95 | unlisted |
| DeepInfra | $2.85 | $14.25 | bf16 |
| Moonshot AI (first-party) | $3.00 | $15.00 | mxfp4 |
| Together, Fireworks, Parasail, Modal | $3.00 | $15.00 | mixed |
Source: OpenRouter's public endpoints API for moonshotai/kimi-k3, pulled September 14, 2026. Two things the price column hides. Quantization varies across hosts, from the native MXFP4 checkpoint through fp8, fp4, and a bf16 dequantization, so a cheaper route is not necessarily the same artifact. And max output length varies enormously: most endpoints allow 943,718 tokens, while DeepInfra caps completions at 16,384, which will silently truncate long agent turns that work everywhere else.
Telnyx made the undercut explicit when it launched K3 day-zero on Hacker News on July 27, 2026 at $2.70 in, $0.27 cached, and $13.50 out, 10% under Moonshot's list. Its co-founder answered in-thread, and the practical detail for anyone blocked on residency is the region list: Atlanta, Denver, Paris, Sydney, and the UAE, with a business associate agreement available on request. Commenters in that thread pushed hard on whether a 10% discount is compatible with owning the hardware, which is the right question to ask of any provider priced under the model's author.
Beyond OpenRouter, the models are mirrored on cloud marketplaces (Amazon Bedrock carries K2.5 and K2-Thinking; NVIDIA and Cloudflare Workers AI carry K2.6). Which route to pick: Moonshot's own API for day-zero access to new models, the recharge tiers, and the request-signature proof; OpenRouter for one key across many providers with automatic failover; a regional host such as Telnyx when data residency decides it; a cloud marketplace when the model has to sit inside an existing billing and compliance boundary. The other China-origin first-party API in the same price band is Alibaba's Model Studio; the Qwen API guide has its Singapore and US endpoints, model IDs, and rate limits.
Kimi API vs Serving Open Alternatives
Since July 27 the choice is no longer "K3 or something else." The weights are public, so the same model is purchasable from whoever serves it best. Morph serves K3 as morph-kimik3 on custom codegen kernels at $2.50 in, $0.29 cached, $14.00 out per M tokens, with the full 1,048,576-token context. That is 17% under Moonshot's input rate on the identical architecture. Below it sit cheaper open models for the work that does not need a 2.8T flagship.
| kimi-k3 (Moonshot) | morph-kimik3 | morph-glm53-744b | morph-dsv4flash | |
|---|---|---|---|---|
| Input | $3.00 | $2.50 | $1.19 | $0.14 |
| Cached input | $0.30 | $0.29 | $0.20 | $0.04 |
| Output | $15.00 | $14.00 | $6.00 | $0.40 |
| Context | 1,048,576 | 1,048,576 | 1,048,576 | 1,048,576 |
| Weights available | Yes, since Jul 27 | Same weights | Yes | Yes |
| Batch discount | None for K3 | n/a | n/a | n/a |
| Thinking control | Always on; effort low/high/max | Same model | Effort levels | Effort levels |
Moonshot column from platform.kimi.ai pricing, checked September 14, 2026. Morph rates from src/lib/pricing.ts and context from src/lib/models.ts, the constants that bill the API.
Pick by what dominates the bill. If it is reasoning quality on a small number of hard tasks, K3 is the model and the only question is who serves it. GLM-5.3 744B runs at about a quarter of K3's output price with weights you can hold, and DeepSeek V4 Flash at roughly 2% of it for high-volume codegen where per-task cost dominates. For the previous Moonshot generation and how agent swarms used it, see Kimi K2.5 and agent swarms. For the full lineup Morph serves, see Open Source Models.
Kimi API: Pros and Cons
- Three protocols on one host: OpenAI Chat Completions and Responses on /v1, Anthropic Messages on /anthropic, one key for all three
- kimi-k3: 2.8T params, 1,048,576 context priced flat at $3/$15, native vision, reasoning_content exposed as a separate stream
- reasoning_effort now accepts low, high, and max, so cheap calls no longer have to pay max-effort reasoning
- Cheap K2 tier: kimi-k2.7-code at $0.95/$4.00, dropping to $0.57/$2.40 on the Batch API at 60% of list
- Automatic context caching with no cache ID or TTL to manage, at $0.30/M on K3
- Request Signature proves a call reached the real Kimi API for the model you named, not a proxy substituting a cheaper one
- Zero Data Retention available to enterprise customers on request
- K3 thinking cannot be disabled and reasoning_effort defaults to max, so an unconfigured client pays the ceiling on every call
- Tier 0 is 1 concurrent request and 3 RPM, and Tier 5 at $3,000 lifetime spend is still only 300 RPM
- 429 covers three unrelated failures and only error.type separates them; the OpenAI SDK's default auto-retry amplifies all three
- No published per-region processing map for api.moonshot.ai, so strict residency needs ZDR, a regional host, or self-hosting
- K3 has no Batch tier, so bulk flagship work pays full interactive price
- Open Platform, Kimi Code, and Kimi Membership keys and balances are mutually non-interchangeable
- Minimum $1 top-up required; no trial credits and no free API tier
FAQ
What is the Kimi API base URL?
The service address is https://api.moonshot.ai, and the base URL depends on the protocol. https://api.moonshot.ai/v1 serves both OpenAI Chat Completions and OpenAI Responses. https://api.moonshot.ai/anthropic serves Anthropic Messages, which is what Claude Code speaks. Auth is a bearer API key from platform.kimi.ai, and K3 unlocks after a $1 minimum top-up.
How much does the Kimi API cost?
kimi-k3: $3.00/M input, $0.30/M cached, $15.00/M output, flat at any context length. kimi-k2.7-code and kimi-k2.6: $0.95/$4.00, cached at $0.19 and $0.16. kimi-k2.7-code-highspeed: $1.90/$8.00, cached at $0.38. The Batch API runs the two K2 models at 60% of list, $0.57/$2.40. K3 has no batch tier. Checked September 14, 2026.
Is the Kimi API free?
No. It is prepaid pay-as-you-go with a $1 minimum top-up, no trial credits, and no free tier. Tier 0 allows 1 concurrent request, 3 RPM, and 1.5M tokens per day. You can test a prompt in the platform Playground before paying. The consumer Kimi app is free; the programmatic API is metered.
How do I get a Kimi API key?
Sign in at platform.kimi.ai, open API Keys in the console, and create a key. Export it as MOONSHOT_API_KEY and pass it to the OpenAI SDK with base_url set to https://api.moonshot.ai/v1. A $1 top-up unlocks K3. Kimi Code and Kimi Membership issue separate keys that do not work here.
Is the Kimi API OpenAI-compatible?
Yes, and Anthropic-compatible. Point the OpenAI SDK's base_url at https://api.moonshot.ai/v1 and pass a Moonshot key. Two extensions break the schema: pass thinking through extra_body, and set partial on an assistant message rather than at the top level. Cap retries, since the SDK auto-retries 429 and 5xx by default and each retry consumes quota.
What models does the Kimi API offer?
Four: kimi-k3 (2.8T params, 1,048,576 context, native vision), kimi-k2.7-code and kimi-k2.7-code-highspeed (262,144 context, coding-tuned, the highspeed variant at roughly 180 output tokens per second), and kimi-k2.6 (262,144 context, multimodal, thinking and non-thinking modes). kimi-k2.5 and the whole moonshot-v1 series were retired at 16:00 on August 31, 2026 and return 404 now.
How do I use the Kimi API with Claude Code?
Set ANTHROPIC_BASE_URL to https://api.moonshot.ai/anthropic, ANTHROPIC_AUTH_TOKEN to your Moonshot key, and every model slot to the alias kimi-k3[1m], with ANTHROPIC_DEFAULT_HAIKU_MODEL on kimi-k2.7-code. Add CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000 and CLAUDE_CODE_EFFORT_LEVEL=max. Moonshot warns that omitting any one variable makes that feature fail silently. Verify with /status, since the /model menu never shows Kimi names.
Why am I getting a 429 error from the Kimi API?
Read error.type. engine_overloaded_error is server-side load, so back off and do not bother topping up. rate_limit_reached_error is an organization-level concurrency, RPM, TPM, or TPD ceiling. exceeded_current_quota_error is insufficient balance. Requests interrupted by a 429 are not charged, and the OpenAI SDK's default auto-retry turns one call into several that each consume quota.
Where is Kimi API data processed?
Moonshot publishes no per-region processing map for api.moonshot.ai, so treat the hosted API as processing outside the EU and US. Zero Data Retention is available to enterprise customers on request, though it does not cover direct image and video uploads. Since the K3 weights opened on July 27, 2026, running it in your own region is the other option.
What are the Kimi API rate limits?
Six tiers by cumulative recharge. Tier 0 ($1): 1 concurrent, 3 RPM, 500K TPM, 1.5M TPD. Tier 1 ($10): 15 concurrent, 100 RPM, 2M TPM, unlimited daily. Tier 3 ($100): 50 concurrent, 200 RPM, 3M TPM. Tier 5 ($3,000): 100 concurrent, 300 RPM, 5M TPM. Limits are organization-level, so extra keys add no headroom.
What is the newest Kimi API model?
kimi-k3, launched July 16, 2026: 2.8T parameters, 1,048,576-token context, native vision, thinking always on with reasoning_effort at low, high, or max. Full details on the Kimi K3 page.
Can I self-host Kimi K3?
Yes, since July 27, 2026. Moonshot published the K3 weights on Hugging Face at moonshotai/Kimi-K3 under the Kimi K3 License as a native MXFP4 checkpoint, and vLLM and SGLang shipped Kimi Delta Attention support at release. The K2 family is open too. Morph serves the same K3 weights as morph-kimik3 if you would rather not run a 2.8T model yourself.
Why does my Kimi API key return 401 in Kimi Code?
Because they are different products. Open Platform keys, Kimi Code keys, and Kimi Membership benefits do not interoperate, and balances do not convert in either direction. Keys are also isolated per regional Kimi platform. Call GET /v1/models with the key in question to see what it can actually reach.
The fastest endpoints are private deployments
Morph's top speeds come from dedicated deployments, not shared public endpoints: speculators trained on your traffic, caching tuned to your workload, and volume discounts over public per-token rates. Over 500 billion tokens per day run this way.
Running open models at scale?
Morph serves Kimi K3, GLM-5.3 744B, GLM-5.3-Flash, and DeepSeek V4 Flash on custom codegen kernels with speculators trained on coding traffic. One OpenAI-compatible API, priced per token, with private single-tenant deployments for data-residency needs.
Sources
Every link below was fetched on September 14, 2026.
- Moonshot AI platform: API overview (service address api.moonshot.ai; the three protocols and their base URLs; thinking via extra_body; partial as a message field; the full endpoint table)
- Moonshot AI platform: Model inference pricing (kimi-k3 $3.00/$0.30/$15.00 at 1,048,576; kimi-k2.7-code and kimi-k2.6 $0.95/$4.00; highspeed $1.90/$0.38/$8.00)
- Moonshot AI platform: BatchJob pricing (batch at 60% of standard; $0.57/$2.40 for kimi-k2.7-code and kimi-k2.6; K3 unsupported; exempt from real-time concurrency limits)
- Moonshot AI platform: Recharge and rate limiting (the full Tier 0-5 table: $1 to $3,000 cumulative recharge, 1 to 100 concurrency, 3 to 300 RPM, 500K to 5M TPM, 1.5M TPD at Tier 0 only)
- Moonshot AI platform: Common error codes (the three 429 types engine_overloaded_error / rate_limit_reached_error / exceeded_current_quota_error; organization-level wording; 504 at 900 seconds; platform key isolation)
- Moonshot AI platform: Troubleshooting ($1 minimum top-up unlocks K3; reasoning_effort low/high/max with max default and no way to disable thinking; 429s not charged; SDK retry amplification; kimi-k3 vs the kimi-k3[1m] Claude Code alias; automatic context caching)
- Moonshot AI platform: Model list (four live models; kimi-k2.5 and moonshot-v1 retired August 31, 2026; kimi-k2 series May 25, 2026; kimi-latest January 28, 2026; all now 404)
- Moonshot AI platform: Changelog (the August 31, 2026 16:00 retirement of kimi-k2.5 and the moonshot-v1 series, and the Files API changes shipped the same day)
- Moonshot AI platform: Use Kimi in Claude Code (the settings.json env block: ANTHROPIC_AUTH_TOKEN, kimi-k3[1m] across every model slot, CLAUDE_CODE_AUTO_COMPACT_WINDOW=1000000, CLAUDE_CODE_EFFORT_LEVEL=max, and the silent-failure warning)
- Moonshot AI platform: Verify request signature (X-Msh-Request-Nonce, the reqsigv1_ signature, /v1/signatures/verify, and the explicit absence of replay protection)
- Moonshot AI platform: Zero Data Retention (enterprise-only, deletes prompts and responses on return, not guaranteed for direct image and video uploads)
- Moonshot AI platform: Kimi Code CLI with an Open Platform key (install scripts, /login platform selector, KIMI_SHELL_PATH on Windows)
- GitHub: MoonshotAI/kimi-code (MIT license, 7,374 stars, release 0.43.0 published September 14, 2026; issue #3014 on failed Login Device calls consuming subscription quota; issue #2622 on reliability past ~500K context fill)
- OpenRouter: kimi-k3 endpoints API (20 endpoints from 17 providers, $2.10 to $4.50 input, quantization from mxfp4 to bf16, max completion 943,718 except DeepInfra at 16,384)
- Telnyx: inference pricing and inference regions (Kimi K3 at $2.70/$0.27/$13.50; GPUs in Atlanta, Denver, Paris, Sydney, and the UAE)
- Hacker News: Kimi K3 now available via Telnyx Inference API (July 27-28, 2026; the 10%-under-list pricing debate, the co-founder answering in-thread, BAA availability, and Nebius/Cortecs at €2.693/€13.464)
- Hugging Face: moonshotai/Kimi-K3 (the open weights, live since July 27, 2026, 2.8T parameters, 2.2M downloads as of September 14, 2026)