How to Use Claude Code with Agent Router in VS Code FREE
This guide will show you how to install Anthropic's official Claude Code tool on Windows and route it through Agent Router to use promotional API credits instead of a ρáíd subscription.Step 1: Claim Your Free API Key
You do not have permission to view the full content of this post. Log in or register now.
Step 2: Install Node.js
Claude Code requires Node.js to run on your computer.- Visit the You do not have permission to view the full content of this post. Log in or register now..
- Download and install the LTS (Long Term Support) version.
- Click through the installer, leaving all the default settings checked.
Step 3: Install Claude Code in VS Code
Windows has built-in security features that can block new developer tools from installing via PowerShell. We need to allow the installation first.- Open Visual Studio Code.
- Press
Ctrl +` (the key above Tab) to open the terminal. - Paste the following command and hit Enter to allow script executions for your user account:
PowerShell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Now, install Claude Code globally by running this command:
PowerShell
npm install -g @anthropic-ai/claude-code - Wait for the installation progress bar to finish.
Step 4: Configure the Proxy Settings
We need to rewrite the tool's internal compass so it sends requests to Agent Router instead of Anthropic's default servers.- In your VS Code terminal, run this command to open the hidden configuration file:
PowerShell
notepad $HOME\.claude\settings.json
(Note: If Notepad says it cannot find the path, run the command claude once, press Ctrl + C to exit it, and try the notepad command again). - When Notepad opens, delete anything inside and paste the following block exactly:
JSON
{
"env": {
"ANTHROPIC_BASE_URL": "You do not have permission to view the full content of this post. Log in or register now.",
"ANTHROPIC_AUTH_TOKEN": "sk-your-agentrouter-key",
"ANTHROPIC_MODEL": "claude-opus-4-6"
},
"alwaysThinkingEnabled": true,
"model": "claude-opus-4-6",
"effortLevel": "high"
}
Crucial: Replace sk-your-agentrouter-key with the actual key you copied in Step 1. Ensure you keep the quotation marks around the key. - Save the file (Ctrl + S) and close Notepad.
Step 5: Launch and Test
- Back in your VS Code terminal, start the tool using your custom proxy model:
claude -<span>-model</span> claude<span>-opus</span><span>-4</span><span>-6</span><br> - You will see a prompt asking to set up terminal settings. Choose 1. Yes, use recommended settings and hit Enter.
- Type hello into the chat and hit Enter.
credits Aurelian thanks sa tutorial mas pinadali lng pong tutorial to.

.webp)
