StartupAPI Docs

Windows

Install Claude Code on Windows

Five steps with separate PowerShell and Command Prompt paths, from Anthropic’s native installer to verified StartupAPI routing.

Estimated time: under 5 minutesWindows 10 1809+, Windows Server 2019+, or newer.Last updated: August 21, 2026

Identify your shell

Use the path that matches the prompt in front of your cursor. Do not paste commands from the other shell.

ShellPrompt exampleUse this path
PowerShellPS C:\Users\Name>PowerShell path
Command PromptC:\Users\Name>Command Prompt (CMD) path

Install Claude Code

Choose one native installer. Administrator access is not required.

PowerShell path

Downloads and runs Anthropic's official PowerShell installer.

PowerShell
irm https://claude.ai/install.ps1 | iex

Command Prompt (CMD) path

Downloads Anthropic's official CMD installer, runs it, and deletes the temporary install.cmd file after success.

Command Prompt (CMD)
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

WinGet alternative

Installs the official Claude Code WinGet package. WinGet installs require manual upgrades.

PowerShell or CMD
winget install Anthropic.ClaudeCode

Connect StartupAPI

Use the configuration block for the same shell you chose above.

PowerShell path

This saves the minimum gateway and Bearer-token settings, then pins main, alias, background, and subagent model selection to examples enabled in the current StartupAPI catalog. Replace YOUR_STARTUPAPI_API_KEY with your key.

PowerShell
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://startupapi.io", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "YOUR_STARTUPAPI_API_KEY", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", $null, "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "claude-sonnet-4-6", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_SONNET_MODEL", "claude-sonnet-4-6", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_OPUS_MODEL", "claude-opus-4-6", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_HAIKU_MODEL", "claude-haiku-4-5", "User")
[Environment]::SetEnvironmentVariable("CLAUDE_CODE_SUBAGENT_MODEL", "claude-sonnet-4-6", "User")

Command Prompt (CMD) path

These CMD-compatible SETX commands persist the StartupAPI base URL, Bearer token, and current catalog-derived model example for your Windows user. Replace YOUR_STARTUPAPI_API_KEY with your key.

Command Prompt (CMD)
setx ANTHROPIC_BASE_URL "https://startupapi.io"
setx ANTHROPIC_AUTH_TOKEN "YOUR_STARTUPAPI_API_KEY"
setx ANTHROPIC_MODEL "claude-sonnet-4-6"

Open a new shell and verify

Persistent user variables appear in new processes. Close the shell you used, reopen the same shell, then run its verification block.

PowerShell verification

Reads the values in the new PowerShell process and checks the Claude Code installation.

PowerShell
$env:ANTHROPIC_BASE_URL
$env:ANTHROPIC_MODEL
claude --version

CMD verification

Reads the values in the reopened CMD process and checks the Claude Code installation.

Command Prompt (CMD)
echo %ANTHROPIC_BASE_URL%
echo %ANTHROPIC_MODEL%
claude --version

Open your project, launch, and verify the gateway

Change to your project folder, run claude, then enter /status inside Claude Code.

The cd command works in both PowerShell and CMD. Claude Code then opens an interactive session in that project.

PowerShell or CMD
cd "C:\path\to\your-project"
claude

Common mistakes

  • Mixing shell syntaxPowerShell uses irm, iex, [Environment], and $env:. CMD uses install.cmd, setx, and %VARIABLE% syntax.
  • Not reopening the shellPowerShell user-variable changes and CMD SETX changes apply to new terminal processes.
  • Running from the wrong folderStart claude from your project folder, not your home folder.

Troubleshooting

Hit an error during install or your first prompt? Match the message to a fix.

Open Troubleshooting