Follow these steps to connect Claude Code with Free-Way.
export ANTHROPIC_BASE_URL=http://localhost:8787
export ANTHROPIC_API_KEY=your_freeway_api_keyThe ANTHROPIC_API_KEY can be any non-empty string if Free-Way's gateway auth is disabled. To set a custom gateway key, go to the Free-Way console → API Keys tab and enter your desired FREEWAY_API_KEY — then use that same value here.
On Windows (PowerShell):
$env:ANTHROPIC_BASE_URL="http://localhost:8787"
$env:ANTHROPIC_API_KEY="your_freeway_api_key"Start Claude Code after setting environment variables.
Run a simple test prompt and confirm that responses are routed through Free-Way.
- Free-Way automatically routes requests to the best available free provider.
- Ensure Free-Way server is running before testing.