Kimi K3 API: One Key for Claude Code, Cline, and Every Client

Get a Kimi K3 API key and run Moonshot's 2.8T flagship at $2.80/M input, $0.29/M cached, $14/M output, under Moonshot list. OpenAI-compatible and Anthropic Messages-compatible, so it drops into Claude Code, Cline, OpenCode, and Cursor with no user-agent whitelist. Includes the multi-turn thinking-replay setup most harnesses get wrong.

July 21, 2026 · 1 min read
Per 1M tokens in/out, under Moonshot list
$2.80 / $14
Per 1M tokens in/out, under Moonshot list
Cached input
$0.29/M
Cached input
Token context, flat pricing
1M
Token context, flat pricing
OpenAI + Anthropic Messages
2 APIs
OpenAI + Anthropic Messages

The Kimi K3 API on Morph

Kimi K3 is Moonshot AI's 2.8T flagship: 1M-token context, native vision, open weights since July 27, and the strongest agentic benchmark suite in the open lineage (81.2 FrontierSWE, 88.3 Terminal-Bench 2.0, Artificial Analysis Index 60). Morph serves it as morph-kimik3 on GB300 NVL72 racks at $2.80/M input, $0.29/M cached, and $14/M output, under Moonshot's $3/$15 list. The endpoint speaks both the OpenAI API and the Anthropic Messages API natively, so it drops into Claude Code, Cline, OpenCode, Roo Code, or Cursor with one key and no user-agent whitelist, unlike Moonshot's own API, which restricts which agents may call it. A latency-tuned SKU, morph-kimik3-fast, runs the same weights at $6/M in and $22.5/M out for interactive workloads.

Kimi K3 API pricing by provider (per 1M tokens)
ProviderInputCached inputOutputContext
Morph (morph-kimik3)$2.50$0.29$14.001M
DeepInfra$2.85$0.285$14.251M
Moonshot AI (first-party)$3.00$0.30$15.001M
Fireworks AI$3.00$0.30$15.001M
Together AI$3.00$0.30$15.001M
Baseten$3.00$0.30$15.001M

Prices checked August 21, 2026. Non-Morph rows from the OpenRouter Kimi K3 provider table and the providers' own model pages (fireworks.ai, together.ai/pricing). Morph row from live billing rates.

Use It in Claude Code

Claude Code moved 348 billion tokens of K3 traffic through OpenRouter alone in the weeks after launch; it is the single biggest K3 client. Most setups route through a format proxy. Morph's endpoint speaks the Anthropic Messages API natively, so Claude Code points at it directly:

export ANTHROPIC_BASE_URL="https://api.morphllm.com"
export ANTHROPIC_AUTH_TOKEN="your-morph-api-key"
export ANTHROPIC_DEFAULT_OPUS_MODEL="morph-kimik3"
export ANTHROPIC_DEFAULT_SONNET_MODEL="morph-kimik3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="morph-kimik3"
claude

Set all three model aliases: Claude Code sends subagent and background traffic to the Sonnet and Haiku aliases, and an unset alias falls through to a model your key cannot reach. K3's thinking replay is handled server-side on this path, so multi-turn agent sessions keep their reasoning history intact.

Use It in Cline, Cursor, OpenCode

For OpenAI-compatible clients, set the base URL to Morph, pass your key, call the model. The same key works in Cline, OpenCode, Roo Code, Aider, and Cursor's custom-model setting.

from openai import OpenAI

client = OpenAI(
    base_url="https://api.morphllm.com/v1",
    api_key="YOUR_MORPH_API_KEY",
)

resp = client.chat.completions.create(
    model="morph-kimik3",
    messages=[
        {"role": "user", "content": "Build a landing page hero in React."},
    ],
)
print(resp.choices[0].message.content)

In an editor, set the provider base URL to https://api.morphllm.com/v1 and enter morph-kimik3 as the model. It needs no extra headers and no whitelisted user agent. Migrating off the retiring Moonshot models: kimi-k2.5 and the moonshot-v1 series sunset on August 31, 2026, so K3 is the lineage's continuation path.

Pricing and the Caching Math

Pay per token, billed through one Morph account, flat at any context length up to the full 1M window.

Kimi K3 API pricing (per 1M tokens)
ProviderInputCached inputOutputContext
Morph (morph-kimik3)$2.5$0.29$14.001M
Morph Fast (morph-kimik3-fast)$6.00$0.60$22.501M
Moonshot (kimi-k3)$3.00$0.30$15.001M, flat

The number that decides real agent bills is the cached-input rate. An agent loop resends the whole conversation every turn, so by turn 30 nearly all input is a cache hit: the same 200K-token session that would cost $0.56 per turn at the $2.80 rate costs about $0.06 at $0.29/M cached. K3 makes this matter more than most models because its multi-turn contract requires replaying prior reasoning (next section), which grows the resent prefix further. If your K3 bill looks wrong, check the cache-hit ratio before the sticker price.

The mechanics behind that ratio, every provider's cached-input rate side by side, and the session-key pattern that keeps a conversation on the worker holding its prefix are on the prompt caching page.

The Thinking-Replay Gotcha

The most common K3 complaint ("it is worse in my agent than in the Kimi app") is a harness bug, not a model problem. K3 is trained to see its own prior reasoning: in multi-turn and tool-calling flows, Moonshot's docs require sending back reasoning_content and tool_calls from earlier turns exactly as received. Harnesses that strip, truncate, or summarize the thinking history silently degrade the model.

What correct replay looks like

Append the assistant message with its reasoning_content field intact, keep every tool_calls entry verbatim, and never rewrite earlier turns. It costs more prompt tokens (Moonshot's own example bills 599 vs 198 for the stripped version), which is precisely what the $0.29/M cached-input rate absorbs: the replayed prefix is identical every turn, so it caches.

On the Anthropic Messages path (Claude Code against Morph), thinking blocks ride along in the native format, so this contract holds without harness changes. For hand-rolled OpenAI-format loops, verify your framework preserves the field; several popular harnesses shipped fixes for exactly this after the K3 launch.

Why Kimi K3

Top open-lineage agentic scores

81.2 FrontierSWE and 88.3 Terminal-Bench 2.0 (Moonshot-reported), Artificial Analysis Index 60 and 1543 AA-Briefcase Elo, second behind Claude Fable 5 (independent).

1M-token context, flat

A full million-token window with native vision, priced flat: no long-context surcharge at any length. Open weights since July 27 under the custom Kimi K3 License.

Readable reasoning

Fully exposed reasoning traces you can log and debug, unlike the closed frontier's summarized thinking. Structured output, tool calling, and prompt caching included.

For the full breakdown of the model, benchmarks, and architecture, see the Kimi K3 deep dive. For head-to-heads, see Kimi K3 vs Claude and GLM-5.2 vs Kimi K3. For the other open models Morph serves, see Open Source Models.

Private deployments

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 100 billion tokens per day run this way.

Talk to us about a private deployment

Get your Kimi K3 API key

One key, two API formats, priced under Moonshot list. Works across Claude Code, Cline, OpenCode, Cursor, and every model Morph serves.

FAQ

How do I get a Kimi K3 API key?

Sign up and create a key from the dashboard. Set base_url to https://api.morphllm.com/v1, pass the key, and call morph-kimik3.

How much does the Kimi K3 API cost?

$2.5/M input, $0.29/M cached, $14/M output on Morph, under Moonshot's $3/$0.30/$15 list, flat to the full 1M context.

Can I use it in Claude Code?

Yes, natively: point ANTHROPIC_BASE_URL at https://api.morphllm.com and set the model aliases to morph-kimik3. It works without a proxy or a user-agent whitelist.

Why is K3 worse in my agent than in the Kimi app?

Almost always stripped thinking history. Replay reasoning_content and tool_calls verbatim across turns; the cached-input rate absorbs the extra prompt tokens.