Back to Blog
#Claude#AI#Setup#Free

Free Claude Code Setup

Feb 5, 2026
3 min read

Claude Code is a powerful tool, but sometimes you want to use it with alternative providers or for free. Here is how you can set it up using Agent Router.

Recommended Providers

Setup Steps

  • Step 1
    Install Claude Code: Run the following command to install Claude Code globally.
    npm install -g @anthropic-ai/claude-code
  • Step 2
    Set Base URL: Configure the base URL to use Agent Router.
    setx ANTHROPIC_BASE_URL "https://agentrouter.org/"
  • Step 3
    Set Auth Token: Provide your API key.
    setx ANTHROPIC_AUTH_TOKEN "API_KEY"
  • Step 4
    Set Model: Choose the Claude Opus model.
    setx ANTHROPIC_MODEL "claude-opus-4-6"
  • Step 5
    Launch Claude: Simply type claude to start.
    claude
Note: Make sure to restart your terminal after running the setx commands for the changes to take effect.