It's much easier than that, no openrouter needed Open your terminal that you normally use claude code with Type export ANTHROPIC_AUTH_TOKEN=EnterKimiv2APIHere Type export ANTHROPIC_BASE_URL= https://api.moonshot.ai/anthropic Start claude and you're done lol Kimi v2 works well with opencode too but to be honest, I'm finding it to be quite slow. Answer from ayowarya on reddit.com
🌐
Medium
medium.com › @hungry.soul › vibe-coding-with-claude-code-groq-kimi-k2-ef814bbcdac5
Vibe coding with Claude Code + Groq + Kimi K2 | by Hungrysoul | Medium
July 16, 2025 - Just to give you an idea why I’m ... between Kimi K2 on Groq and Claude Sonnet 4 from Anthropic: ... Yup, that’s right — it’s nearly 3x faster and about 5x cheaper per token. Pretty hard to beat. The best part? The setup takes about five minutes. Here’s how you do it: First, install Claude Code and Claude Code Router...
🌐
Reddit
reddit.com › r/vibecoding › how i'm using kimi k2 in claude code
r/vibecoding on Reddit: How I'm using Kimi K2 in Claude Code
July 14, 2025 -

Kimi K2 is a pretty interesting model, I'm getting good results when compared to Sonnet 4 and paying 80% less by using it through OpenRouter. So here it goes a small guide if you want to give it a try!

  1. Create an account at https://openrouter.ai/ and grab your API key

  2. Run: npm install -g u/anthropic-ai/claude-code

  3. Run: ​npm install -g u/musistudio/claude-code-router

  4. Add the content of this gist to your ~/.claude-code-router/config.json (update it with your OpenRouter API key)

  5. Run: ccr code

And that's it!

Cool thing is that you can edit the config.json file and add any other LLM available in openrouter.ai !

If you want more tips and tricks about AI coding like that, check https://aicode.guide !

🌐
GitHub
github.com › musistudio › claude-code-router › issues › 245
About kimi-k2 · Issue #245 · musistudio/claude-code-router
July 18, 2025 - I know many people are currently accessing Kimi through CCR, but unfortunately, most unofficial APIs are using quantized versions of the model. Only a small number of providers offer models with ca...
Published   Jul 18, 2025
🌐
Hugging Face
huggingface.co › blog › francesca-petracci › kimi-k2-claude-code
Use Kimi K2 with Claude Code Router: A Developer's Guide
Agentic Capabilities: Kimi K2 is ... and execute them autonomously. ... Claude Code Router is an open-source tool that acts as a local proxy for your LLM requests....
🌐
Apidog
apidog.com › blog › kimi-k2-claude-code
You Can Use Kimi K2 with Claude Code, Here's How:
July 13, 2025 - Something crazy just happened for the AI Coding Game. I was scrolling through my feed when I stumbled upon a thread discussing a wild new setup: developers are running Moonshot AI's brand-new Kimi K2 model directly within Claude's coding environment. At first, it sounded like a weird fan-fiction ...
🌐
Skool
skool.com › ai-community › use-kimi-k2-in-claude-code
Use Kimi K2 in claude code · AI Marketing
is to use kimi k2 model inside of claude code · you get almost the same functionality and can still get lots done. here is how · sign up to openrouter, get an api key, load some money · install claude code router - https://github.com/musistudio/claude-code-router ·
🌐
Medium
medium.com › @Erik_Milosevic › how-to-run-kimi-k2-inside-claude-code-the-ultimate-open-source-ai-coding-combo-22b743b69e5a
How to Run Kimi K2 Inside Claude Code: The Ultimate Open-Source AI Coding Combo | by Erik Milošević | Medium
August 20, 2025 - This open approach, combined with agentic coding power, makes Kimi K2 a foundational tool for the future of software development. The secret to this integration is Moonshot AI’s Anthropic-compatible API endpoint. By redirecting Claude Code’s requests to Kimi K2, you get all the benefits of Claude’s interface with the muscle of Kimi K2 under the hood.
Find elsewhere
🌐
YouTube
youtube.com › watch
Kimi K2 Live Setup with Claude Code, Cursor, & Repo Prompt - YouTube
Kimi K2 is taking the AI world by storm, but how do you actually use it in your day-to-day workflow? In this stream, I show you my complete setup to run Kimi...
Published   July 14, 2025
🌐
Reddit
reddit.com › r/chatgptcoding › claude code router - which models work best? kimi k2?
r/ChatGPTCoding on Reddit: Claude Code Router - Which models work best? Kimi K2?
May 23, 2025 -

Which model has the best tool calling with Claude code router?

Been experimenting with claude code router seen seen here: https://github.com/musistudio/claude-code-router

I got Kimi-K2 to work with Groq, but the tool calling seems to cause issues.

Is anyone else having luck with Kimi-k2 or any other models for claude code router (which is of course quite reliant on tool calling). Ive tried trouble shooting it quite abit but wondering if this is a config issue.

🌐
Moonshot
platform.moonshot.ai › docs › guide › agent-support
Use kimi k2 Model in ClaudeCode/Cline/RooCode
Kimi Open Platform, providing trillion-parameter K2 large language model API, supporting 256K long context and Tool Calling. Professional code generation, intelligent dialogue, helping developers build AI applications.
🌐
YouTube
youtube.com › watch
Kimi-K2 CLI (CCR + Kimi-K2): I'm REALLY Impressed! I'm switching from Claude Code! - YouTube
In this video, I'll be showing you how to use the amazing Kimi K2 model with Claude Code and OpenCode. Kimi K2 is now available on OpenRouter, making it even...
Published   July 13, 2025
🌐
GitHub
github.com › musistudio › claude-code-router › issues › 192
Add following config for Kimi-k2 · Issue #192 · musistudio/claude-code-router
May 28, 2025 - { "Providers": [ { "name": "kimi-k2", "api_base_url": "https://openrouter.ai/api/v1/chat/completions", "api_key": "api-key", "models": [ "moonshotai/kimi-k2" ], "transformer": { "use": ["openrouter"] } } ], "Router": { "default": "kimi-k2,moonshotai/kimi-k2" } }
Published   Jul 15, 2025
🌐
GitHub
github.com › musistudio › claude-code-router › issues › 202
If anyone managed to make work Claude Code with Kimi k2 on Groq, please let us know how you did it! · Issue #202 · musistudio/claude-code-router
June 13, 2025 - Groq is now supporting fast inference, and it would be great if Claude Code Router would allow us to hook up Claude Code with Kimi K2 on Groq! Please share your tips how to make it work. If repo ow...
Published   Jul 16, 2025
🌐
GitHub
github.com › musistudio › claude-code-router
GitHub - musistudio/claude-code-router: Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interact with the model while enjoying updates from Anthropic.
Router: Used to set up routing rules. default specifies the default model, which will be used for all requests if no other route is configured. API_TIMEOUT_MS: Specifies the timeout for API calls in milliseconds.
Starred by 24K users
Forked by 1.9K users
Languages   TypeScript 95.4% | JavaScript 2.9% | CSS 1.6%
🌐
Kimi-k2
kimi-k2.org › blog › 07-ai-coding-assistant-en
Claude Code and Kimi K2: The Ultimate AI Coding Assistant Combination
July 16, 2025 - Discover how Claude Code's intelligent routing perfectly complements Kimi K2's trillion-parameter MoE architecture to create the most advanced AI coding assistant for modern developers.
🌐
Reddit
reddit.com › r/claudeai › claude code + kimi k2 with just 2 env vars
r/ClaudeAI on Reddit: Claude Code + Kimi K2 with just 2 env vars
May 28, 2025 -

Just followed Gary Svenson’s Medium guide — it works perfectly. You only need to set two environment variables, and Claude Code will start routing requests through the Kimi K2 model.

Here’s what to set:

export ANTHROPIC_AUTH_TOKEN=your Moonshot API key
export ANTHROPIC_BASE_URL=https://api.moonshot.ai/anthropic

Then launch Claude Code as usual. It automatically redirects API calls to the new endpoint — no code changes, no extra tools.

The whole setup takes seconds. Claude Code behaves the same as always, but under the hood it’s now powered by K2. It’s a super clean switch, and easy to undo — just clear the variables or revert the URL.

I just hope it helps me get through this rough patch with Claude Code lately.

🌐
GitHub
gist.github.com › automata › 9f47a6ddc231e17eb790e9464be698b3
Kimi K2 + Claude Code Router + Claude Code · GitHub
Kimi K2 + Claude Code Router + Claude Code. GitHub Gist: instantly share code, notes, and snippets.
🌐
Apidog
apidog.com › blog › kimi-k2-thinking-with-claude-code-cursor
How to use Kimi K2 Thinking with Claude Code & Cursor
November 10, 2025 - The Kimi K2 Thinking API is fully compatible with both OpenAI and Anthropic interface specifications. You can use the same SDKs and simply change the base_url and api_key to connect your existing applications to Kimi. You can redirect Claude Code’s API calls to Moonshot AI by setting two environment variables: