Here’s a simple way to run Claude Code through OpenRouter using a free model.
### 1️⃣ Install Claude Code
Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
Mac/Linux:
curl -fsSL https://claude.ai/install.sh | bash
### 2️⃣ Get an OpenRouter API Key
Create an account on OpenRouter → go to API Keys → Create Key.
### 3️⃣ Open Claude Code settings
From your terminal, open:
~/.claude/settings.json
If the file doesn't exist yet, just create it.
### 4️⃣ Add this configuration
{
"env": {
"ANTHROPIC_BASE_URL": "https://openrouter.ai/api",
"ANTHROPIC_AUTH_TOKEN": "YOUR-OPENROUTER-API-KEY",
"ANTHROPIC_API_KEY": "",
"ANTHROPIC_MODEL": "stealth/space-bunny-alpha"
},
"model": "stealth/space-bunny-alpha",
"effortLevel": "high"
}Just replace:
YOUR-OPENROUTER-API-KEYwith your actual OpenRouter API key.
### 5️⃣ Start Claude Code 🚀
Go to your project folder:
cd your-project
Then run:
claude
And that's it.
Claude Code will now route through OpenRouter using Space Bunny Alpha, which is currently available for free and has a 1M context window.
So you can experiment with Claude Code without needing a Claude subscription.