How to Use Claude Code for Free with OmniRoute
One local server. 350+ AI providers. Auto-fallback when one runs dry. Zero API cost to start — no credit card needed. Pick your OS below and follow the steps.
Install Node.js
Required before installing OmniRoute. v18 or higher.
Download and run the Windows installer from the official site:
Once installed, confirm it in PowerShell:
PS > node -v PS > npm -v
Install OmniRoute
Run once globally.
Open PowerShell and run:
PS > npm i -g omniroute
Start the OmniRoute server
Keep this terminal open the entire time.
In the same PowerShell window, run:
PS > omniroute
Want it on a specific port instead? Use --port:
PS > omniroute --port 20200
Then open your browser and go to:
http://localhost:20128/home
Connect your AI providers
Go to Providers section in the web dashboard.
In the OmniRoute dashboard, click Providers in the left sidebar and add these:
Create your combo
Combine all providers into one smart route.
In the dashboard → Combos → Create New Combo. Chain providers in this order and name it omni_combo:
Antigravity ← Priority 1 (OAuth, subscription-level)
↓
Ollama ← Priority 2 (local, free)
↓
OpenRouter ← Priority 3 (API key fallback)
↓
OpenCode Zen ← Priority 4 (API key fallback)
↓
SiliconFlow ← Priority 5 (final fallback)
↓
Model Name: omni_comboCreate an API key
This is your OmniRoute auth token.
Go to API Keys in the left sidebar → Generate a new key → Copy it. You'll use this as YOUR_TOKEN_HERE in the next step.
Set environment variables
Open a NEW PowerShell window for this step.
Run these commands in a new PowerShell window (replace YOUR_TOKEN_HERE with your actual key):
$env:CLAUDE_CONFIG_DIR = "$HOME\.claude-omniroute" $env:ANTHROPIC_BASE_URL = "http://localhost:20128" $env:ANTHROPIC_AUTH_TOKEN = "YOUR_TOKEN_HERE" $env:ANTHROPIC_API_KEY = "" $env:ANTHROPIC_MODEL = "omni_combo"
Verify the configuration
Confirm all variables are set correctly.
In the same PowerShell window, run:
echo $env:CLAUDE_CONFIG_DIR echo $env:ANTHROPIC_BASE_URL echo $env:ANTHROPIC_MODEL
You should see something like:
C:\Users\YOUR_USERNAME\.claude-omniroute http://localhost:20128 omni_combo
Make settings permanent
So you don't have to re-run on every session.
To persist these variables permanently in Windows, run this in PowerShell (as Administrator):
[System.Environment]::SetEnvironmentVariable("CLAUDE_CONFIG_DIR", "$HOME\.claude-omniroute", "User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "http://localhost:20128", "User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "YOUR_TOKEN_HERE", "User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "", "User")
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "omni_combo", "User")Launch Claude Code
Run Claude through OmniRoute.
PS > claude
🎉 Claude Code → OmniRoute → omni_combo
Claude is now routing through your local OmniRoute server with auto-fallback across Antigravity → Ollama → OpenRouter → OpenCode Zen → SiliconFlow. Monitor usage at localhost:20128/home.
⚡ Quick setup
Already know what you're doing? Full flow in two PowerShell windows.
Window 1 — start server:
npm i -g omniroute omniroute
Window 2 — configure & run Claude:
$env:CLAUDE_CONFIG_DIR = "$HOME\.claude-omniroute" $env:ANTHROPIC_BASE_URL = "http://localhost:20128" $env:ANTHROPIC_AUTH_TOKEN = "YOUR_TOKEN_HERE" $env:ANTHROPIC_API_KEY = "" $env:ANTHROPIC_MODEL = "omni_combo" claude
Made for the OmniRoute community · MIT License · github.com/diegosouzapw/OmniRoute