Kimi K3's open weights landed this week, and it immediately took the #1 spot on Frontend Code Arena (Elo 1679, ahead of Claude Fable 5's 1631). The official API costs $3 input / $15 output per million tokens — already about a third of what Fable 5 charges.
But there's a way to run it inside Claude Code at half that: $1.50/$7.50. Setup takes two minutes. Here's the whole thing, including how to verify you're actually being billed the discounted rate.
Why bother?
Every mainstream K3 provider — Moonshot's own API, OpenRouter, Fireworks, SiliconFlow, Novita, Baseten — charges the identical $3/$15. I checked each rate card on 2026-07-28. The only exception is TeamoRouter, a multi-model routing gateway that lists K3 at exactly 50% off:
| Official rate | TeamoRouter | |
|---|---|---|
| Input /1M | $3.00 | $1.50 |
| Cached input /1M | $0.30 | $0.15 |
| Output /1M | $15.00 | $7.50 |
Claude Code is the nicest agentic harness to run K3 in — and since the gateway exposes an Anthropic-compatible endpoint, Claude Code doesn't even know it's talking to a different model provider.
Step 1: Get a key
Sign up at teamorouter.com, create an API key in the dashboard. (Payment works with Stripe, Alipay, or WeChat Pay — and the endpoint is reachable from mainland China without a VPN, if that's relevant to you.)
Step 2: Point Claude Code at the gateway
export ANTHROPIC_BASE_URL="https://api.teamorouter.com/anthropic"
export ANTHROPIC_API_KEY="YOUR_TEAMOROUTER_KEY"
export ANTHROPIC_MODEL="kimi-k3"
claude
That's it. Or make it permanent in ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.teamorouter.com/anthropic",
"ANTHROPIC_API_KEY": "YOUR_TEAMOROUTER_KEY",
"ANTHROPIC_MODEL": "kimi-k3"
}
}
Step 3: Smoke test
Inside Claude Code:
/status
The endpoint line should read api.teamorouter.com. Then throw it a real task:
> refactor src/hooks/useCart.ts to remove the duplicated fetch logic
K3 is a 2.8T-parameter MoE with a 1M-token context window, so it's comfortable slurping large codebases in one go — that context size is the same across all providers, discount or not.
Step 4: Verify you're getting the discount
This is the step people skip. After a few calls, open the gateway dashboard and check the per-request cost breakdown. Sanity math for one request:
32K input (fresh) + 4K output:
32,000 × $1.50/1M = $0.048
4,000 × $7.50/1M = $0.030
expected total ≈ $0.078
At the official $3/$15 the same call would be ≈ $0.156.
If your dashboard shows ~2x the expected number, you're on the wrong pricing tier or the wrong endpoint — see troubleshooting below.
Troubleshooting
401 Unauthorized — Your ANTHROPIC_API_KEY is the TeamoRouter key, right? Not a leftover sk-ant-... key. Also check for a project-level .claude/settings.json overriding your exports.
404 model not found — The model name is exactly kimi-k3 (lowercase, hyphen). No moonshotai/ prefix — that's OpenRouter's namespace convention, not this gateway's.
Still billed at $3/$15 — You're probably hitting a different base URL. Run:
grep -r "ANTHROPIC_BASE_URL" ~/.claude/settings.json .claude/settings.json ~/.zshrc 2>/dev/null
and make sure nothing points at api.moonshot.ai or another provider from a previous setup.
Slow first token — K3 is a huge model; first-token latency varies by upstream. Measured TTFTs across providers range from 1.4s (Novita) to 6.1s (Moonshot official). Gateways route between upstreams, so you'll land somewhere in that band.
The math for a month of agentic coding
Say your Claude Code usage is 30M input + 10M output tokens/month (a busy but realistic solo-dev number):
Official K3 rate: 30×$3 + 10×$15 = $240/month
Via the gateway: 30×$1.50 + 10×$7.50 = $120/month
Claude Fable 5: 30×$15 + 10×$50 = $950/month
Same harness, same workflow. $120 vs $950 is the gap between "the benchmark leader for frontend work" and "the incumbent" — and prompt caching (at $0.15/1M cached) pushes the real number even lower for long agent sessions.
TL;DR
export ANTHROPIC_BASE_URL="https://api.teamorouter.com/anthropic"-
export ANTHROPIC_API_KEY="..."+export ANTHROPIC_MODEL="kimi-k3" - Run
claude, check/status, verify the dashboard bills $1.50/$7.50 - Enjoy the current #1 frontend-coding model (Elo 1679) at ~1/8 the cost of running Fable 5
Prices verified 2026-07-28 — always re-check the pricing page before committing serious volume.
Top comments (0)