Skip to content

Install Claude Code on Windows ​

0. Prerequisite: install Node.js ​

Install Node.js first (22+ recommended): Node.js on Windows

Verify:

powershell
node -v
powershell
npm -v

1. Install Claude Code ​

Open PowerShell and run:

powershell
npm install -g @anthropic-ai/claude-code

Check the install:

powershell
claude --version

2. Connect to Flash API ​

All Claude Code config lives in ~\.claude\settings.json. No environment variables to set.

2.1 Create the config directory ​

powershell
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.claude"

2.2 Write the config file (replace the API key) ​

powershell
@'
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://ai.flashapi.top",
    "ANTHROPIC_AUTH_TOKEN": "YOUR_FLASH_API_KEY",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}
'@ | Set-Content -Path "$env:USERPROFILE\.claude\settings.json" -Encoding UTF8

You must replace YOUR_FLASH_API_KEY with the real key you copied from the Flash API console.

What the settings do:

  • ANTHROPIC_BASE_URL: the Flash API endpoint, without /v1
  • ANTHROPIC_AUTH_TOKEN: your API key
  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: turns off nonessential traffic

2.3 Check the file was created ​

powershell
Get-Content "$env:USERPROFILE\.claude\settings.json"

3. Launch and verify ​

Go to your project directory:

powershell
cd C:\path\to\your\project
powershell
claude doctor
powershell
claude

Troubleshooting ​

1. Permission error on npm install -g ​

Try again in an elevated (Administrator) PowerShell, or manage Node.js with nvm-windows.

2. claude command not found ​

Close PowerShell and open a fresh window. Still failing? Reinstall Claude Code.

One base URL for GPT, Claude and Gemini