cd /news/developer-tools/how-to-use-kimi-k3-with-claude-code-… · home topics developer-tools article
[ARTICLE · art-67260] src=dev.to ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

How to Use Kimi K3 with Claude Code, Cursor, and Cline

LLM Gateway enables developers to use Moonshot's Kimi K3 model, which topped Arena's Frontend Code evaluation, with coding agents like Claude Code, Cursor, and Cline via a simple base-URL change. The gateway supports over 200 models and offers both pay-as-you-go and flat-rate pricing through DevPass.

read3 min views1 publishedJul 21, 2026

Kimi K3 took first place in Arena's Frontend Code evaluation the week it launched, and it holds a 1M-token context — but Moonshot doesn't ship a coding agent, and your coding agent doesn't ship Kimi K3. Claude Code is locked to Anthropic's API by default, Cursor to its own backend, Cline to whatever key you hand it.

LLM Gateway bridges that gap. It speaks both the Anthropic and OpenAI API formats, so the tools you already use can run Kimi K3 — or any of 200+ models — with a base-URL change. Here is the exact setup for each tool.

Claude Code talks to any endpoint that speaks Anthropic's /v1/messages

format, which LLM Gateway does natively. Three environment variables:

export ANTHROPIC_BASE_URL=https://api.llmgateway.io
export ANTHROPIC_AUTH_TOKEN=$LLM_GATEWAY_API_KEY
export ANTHROPIC_MODEL=kimi-k3

claude

That's the whole migration. Every request now routes through LLM Gateway to Kimi K3, and every request shows up in your dashboard with its exact cost, token counts, and cache-hit rate.

One refinement worth adding: Claude Code uses a second, smaller model for routine background work, and you can point it at something cheap — or free:

export ANTHROPIC_SMALL_FAST_MODEL=glm-4.7-flash-free

That puts K3 on the hard reasoning and a $0 model on the housekeeping.

Cursor routes its chat / plan panel (Cmd/Ctrl + L) through a custom OpenAI-compatible endpoint. Setup:

https://api.llmgateway.io/v1

kimi-k3

as a custom model and select itBe aware of the boundary: Cursor's Composer, inline edit (Cmd/Ctrl + K), and autocomplete are locked to Cursor's own backend and will not route through any external endpoint. Plan and chat with K3's full 1M context in Cursor; if you want K3 driving the actual agent loop, use Claude Code or Cline instead.

Cline is the straightforward one — it's built to bring your own key:

https://api.llmgateway.io/v1

kimi-k3

Cline's full agent loop — file edits, terminal commands, project scaffolding — now runs on K3. If you want a specific upstream, use moonshot/kimi-k3

; otherwise the gateway picks a healthy provider and fails over automatically.

Also worth knowing: OpenCode ships LLM Gateway as a built-in provider, so there K3 is a login and a model pick, no URLs at all.

Agent loops are token-hungry, which is exactly the case DevPass was built for — a flat monthly rate instead of a per-token bill:

Plan Price Model usage included
Lite $29/mo ~$87 at provider rates
Pro
$79/mo
~$237
Max $179/mo ~$537

Kimi K3 is a premium-tier model on DevPass (it crosses the $15-per-million-output threshold), so it draws from a weekly premium allowance — roughly $10 per week on Lite, $36 on Pro, $97 on Max. The practical pattern: K3 for planning and the gnarly bugs, a standard-tier model like GLM-5.2 or DeepSeek V4 Pro for the bulk of the loop — both uncapped within your monthly allowance. Pro and Max include one and two Reset Passes per cycle if you burn the premium allowance early.

Prefer straight metering? Pay-as-you-go credits work with the identical setup: top up from $10, pay Moonshot's published rates ($3.00/M input, $0.30/M cached, $15.00/M output) plus a 5% platform fee at top-up. K3's cached-input pricing matters here — agent loops re-send the same context every step, and cache hits bill at a tenth of the fresh rate.

Yes. Claude Code sends Anthropic-format requests to whatever ANTHROPIC_BASE_URL

points at. LLM Gateway accepts that format and translates to each provider behind the scenes, so ANTHROPIC_MODEL=kimi-k3

just works — as does any other model in the catalog.

No. Cursor only honors a custom endpoint for the chat / plan panel; Composer, inline edit, and autocomplete stay on Cursor's backend regardless of your settings. For a full agent loop on K3, use Claude Code, Cline, or OpenCode.

Yes, on every tier, as a premium-tier model with a weekly allowance on top of your monthly credit pool. Standard-tier models — including GLM-5.2 and DeepSeek V4 Pro — have no weekly cap.

The ones that route their full agent loop through your endpoint: Claude Code, Cline, or OpenCode. Cursor is fine for K3-powered planning but keeps its agent features on its own models.

Originally published on the LLM Gateway blog.

── more in #developer-tools 4 stories · sorted by recency
── more on @kimi k3 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-use-kimi-k3-w…] indexed:0 read:3min 2026-07-21 ·