Nathan Hodgson
Library
AutomationsIntermediate2 min readUpdated

Run Claude Code For Free (GitHub Reroute Setup)

How to run Claude Code for free by installing Claude Code Router, a local proxy that reroutes Claude Code to free open models like DeepSeek, Kimi and GLM via OpenRouter or NVIDIA NIM. Same workflow, no token bill.

Open github.com

Claude Code is brilliant, but the bill adds up fast. There's an open source tool on GitHub that sits between Claude Code and Anthropic and quietly reroutes your prompts to other powerful AI models that are free to use. Claude Code still thinks it's talking to Anthropic. You keep the exact same workflow, you just stop paying for the tokens. Here's how to set it up.

What you'll need

  • Claude Code already installed.
  • Node.js and npm on your machine.
  • A free API key from a provider like OpenRouter or NVIDIA NIM.

Step 1: Install the router

Install Claude Code Router globally with npm:

Terminal
npm install -g @musistudio/claude-code-router

Step 2: Grab a free API key

Sign up for a provider that gives free access to open models, then copy an API key:

  • OpenRouter, free access to a range of open models.
  • NVIDIA NIM, free API keys for hosted open models.

Both give you models like DeepSeek, Kimi, and GLM at no cost.

Step 3: Add your provider

Open the router's settings panel:

Terminal
ccr ui

It opens at http://127.0.0.1:3458. Add a new provider, paste in the base URL and your API key, pick the models you want (DeepSeek, Kimi or GLM), then set one as your default route.

Step 4: Run Claude Code through it

Launch Claude Code routed through the tool:

Terminal
ccr code

Claude Code opens exactly like normal, but every request now runs on your free model instead of Anthropic. Use it the same way you always have.

Manage the background service any time with ccr start, ccr stop, and ccr status.

Good to know

Free open models like DeepSeek, Kimi and GLM are strong, but quality varies by task, so results won't always match Claude directly. It's a great way to keep building without a bill, and you can switch back to Anthropic any time by just running Claude Code normally.