{"slug": "how-to-use-kimi-k3-with-claude-code-cursor-and-cline", "title": "How to Use Kimi K3 with Claude Code, Cursor, and Cline", "summary": "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.", "body_md": "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.\n\n**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](https://llmgateway.io/models) — with a base-URL change. Here is the exact setup for each tool.\n\nClaude Code talks to any endpoint that speaks Anthropic's `/v1/messages`\n\nformat, which LLM Gateway does natively. Three environment variables:\n\n```\nexport ANTHROPIC_BASE_URL=https://api.llmgateway.io\nexport ANTHROPIC_AUTH_TOKEN=$LLM_GATEWAY_API_KEY\nexport ANTHROPIC_MODEL=kimi-k3\n\nclaude\n```\n\nThat'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.\n\nOne refinement worth adding: Claude Code uses a second, smaller model for routine background work, and you can point it at something cheap — or free:\n\n```\nexport ANTHROPIC_SMALL_FAST_MODEL=glm-4.7-flash-free\n```\n\nThat puts K3 on the hard reasoning and a $0 model on the housekeeping.\n\nCursor routes its **chat / plan panel** (Cmd/Ctrl + L) through a custom OpenAI-compatible endpoint. Setup:\n\n`https://api.llmgateway.io/v1`\n\n`kimi-k3`\n\nas 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.\n\nCline is the straightforward one — it's built to bring your own key:\n\n`https://api.llmgateway.io/v1`\n\n`kimi-k3`\n\nCline's full agent loop — file edits, terminal commands, project scaffolding — now runs on K3. If you want a specific upstream, use `moonshot/kimi-k3`\n\n; otherwise the gateway picks a healthy provider and fails over automatically.\n\nAlso worth knowing: [OpenCode ships LLM Gateway as a built-in provider](https://llmgateway.io/blog/opencode-built-in-provider), so there K3 is a login and a model pick, no URLs at all.\n\nAgent loops are token-hungry, which is exactly the case [DevPass](https://devpass.llmgateway.io) was built for — a flat monthly rate instead of a per-token bill:\n\n| Plan | Price | Model usage included |\n|---|---|---|\n| Lite | $29/mo | ~$87 at provider rates |\nPro |\n$79/mo |\n~$237 |\n| Max | $179/mo | ~$537 |\n\nKimi 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.\n\nPrefer 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.\n\nYes. Claude Code sends Anthropic-format requests to whatever `ANTHROPIC_BASE_URL`\n\npoints at. LLM Gateway accepts that format and translates to each provider behind the scenes, so `ANTHROPIC_MODEL=kimi-k3`\n\njust works — as does any other model in the catalog.\n\nNo. 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.\n\nYes, 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.\n\nThe 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.\n\n*Originally published on the LLM Gateway blog.*", "url": "https://wpnews.pro/news/how-to-use-kimi-k3-with-claude-code-cursor-and-cline", "canonical_source": "https://dev.to/smakosh/how-to-use-kimi-k3-with-claude-code-cursor-and-cline-1dpi", "published_at": "2026-07-21 15:48:36+00:00", "updated_at": "2026-07-21 16:23:28.836959+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models"], "entities": ["Kimi K3", "Moonshot", "LLM Gateway", "Claude Code", "Cursor", "Cline", "OpenCode", "DevPass"], "alternates": {"html": "https://wpnews.pro/news/how-to-use-kimi-k3-with-claude-code-cursor-and-cline", "markdown": "https://wpnews.pro/news/how-to-use-kimi-k3-with-claude-code-cursor-and-cline.md", "text": "https://wpnews.pro/news/how-to-use-kimi-k3-with-claude-code-cursor-and-cline.txt", "jsonld": "https://wpnews.pro/news/how-to-use-kimi-k3-with-claude-code-cursor-and-cline.jsonld"}}