Skip to content
CLAUDE CODE

Claude Code in 2026: Install on Windows and macOS, Connect Without an Anthropic Account

How to set up Claude Code without an Anthropic account: Windows, macOS, Linux installation, ANTHROPIC_BASE_URL for Claudexia, troubleshooting 401 and rate limits.

Claude Code is Anthropic's official CLI agent that turns your terminal into a real pair-programmer: it reads the repo, edits files, runs tests, opens PRs. The catch — for many developers outside the US, getting it working is harder than it looks: Anthropic restricts signups by region, declines non-US cards, and silently disables existing keys. This guide shows how to install Claude Code on Windows, macOS and Linux, and how to wire it up through Claudexia so you skip the Anthropic account entirely.

Why direct Claude Code signup fails for many developers

When you log in at claude.ai/code, Anthropic checks three things at once: your IP country, whether your phone number is on the supported list, and the issuing country of your card. A failure on any one of them blocks account creation. A VPN handles only the IP — the phone and card requirements remain. Even existing accounts get deactivated within days if the billing card stops verifying.

Claudexia replaces all three checks with a single API key (sk_cdx_…) on a Claude-compatible gateway. You pay with whatever your bank supports, the protocol is identical to Anthropic Messages API, and Claude Code talks to the gateway through a different BASE_URL.

Install Claude Code on every OS

Windows 10/11

PowerShell, normal user:

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

If your corporate network blocks claude.ai, grab claude-windows-x64.exe from the Anthropic GitHub releases, drop it into C:\Users\<you>\bin, and add that folder to PATH. Restart PowerShell.

macOS

curl -fsSL https://claude.ai/install.sh | bash

Or Homebrew:

brew install anthropic-ai/claude/claude

Linux (Ubuntu, Debian, Fedora, Arch)

curl -fsSL https://claude.ai/install.sh | bash

The installer drops the binary at ~/.local/bin/claude. If that's not on your PATH, add this to ~/.bashrc or ~/.zshrc:

export PATH="$HOME/.local/bin:$PATH"

Verify: claude --version should print claude 1.x.x.

Wire up Claudexia (no VPN, no Anthropic account)

Claude Code reads two environment variables: ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL. Point them at Claudexia and you're done.

macOS / Linux

Add to ~/.zshrc or ~/.bashrc:

export ANTHROPIC_BASE_URL="https://api.claudexia.tech"
export ANTHROPIC_API_KEY="sk_cdx_YOUR_KEY"

Restart the shell or run source ~/.zshrc.

Windows (PowerShell, persistent)

[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.claudexia.tech", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk_cdx_YOUR_KEY", "User")

Close and reopen the window for the values to take effect.

One-shot session

If you don't want to touch your profile:

ANTHROPIC_BASE_URL=https://api.claudexia.tech ANTHROPIC_API_KEY=sk_cdx_… claude

Run claude in any repo — the agent now talks to Claudexia. No VPN, no proxy, no hosts file edits.

Get a Claudexia API key

  1. Sign up at claudexia.tech — email only, no card-on-file required.
  2. Top up the balance: any Visa/MC/Mir card, SEPA, SBP, e-wallet, or crypto (USDT/BTC/ETH via CryptoCloud and CryptoBot). No minimum deposit.
  3. Dashboard → API Keys → Create Key. Optionally restrict the key to specific models (e.g. Sonnet 4.6 only) or set a daily spend cap.
  4. Copy the sk_cdx_… value into ANTHROPIC_API_KEY.

Pick the right model for Claude Code

You can pin a model in ~/.config/claude/settings.json:

{
  "model": "claude-sonnet-4.6-20251001"
}

Practical guidance:

  • Claude Sonnet 4.6 — best price/quality balance, the default for most coding work.
  • Claude Opus 4.7 — long refactors, multi-module tasks, 1M-token context window. Roughly 5x the cost, but the quality gap on complex PRs is real.
  • Claude Haiku 4.5 — fast small edits, commit message generation, autocomplete. Cheap enough for high-volume agents that fire many small calls.

What does Claude Code cost on Claudexia

There's no subscription — pay-as-you-go per million tokens, per model. In practice, an active developer running 30-40 PRs a week on Sonnet 4.6 with prompt caching pays $8-15/month. That's a fraction of Claude Pro ($20/mo) or Claude Max ($200/mo) unless you're constantly hitting their daily caps.

Prompt caching cuts the bill another 60-80%: Claudexia forwards the cache_control headers transparently, so Claude Code reads from cache at the standard 0.10x rate.

Common failures and fixes

claude not found — install dir isn't on PATH. Open a fresh terminal; if it still fails, inspect echo $PATH (Unix) or $env:PATH (PowerShell).

401 Unauthorized / invalid_api_key — key copied with a stray space or the old key still in env. Create a fresh key in the Claudexia dashboard, replace the variable, restart the shell.

429 rate_limit_exceeded — either the per-key daily cap fired or the balance hit zero. Open the Claudexia dashboard → top up or raise the cap.

getaddrinfo ENOTFOUND api.anthropic.comANTHROPIC_BASE_URL didn't take. Run echo $ANTHROPIC_BASE_URL; it must print https://api.claudexia.tech. If empty, restart the editor and the terminal.

Cursor / VS Code Claude extension can't see the key — extensions read env on IDE start. Fully quit (Cmd+Q on macOS, not just close-window) and reopen.

FAQ

Does Claude Code work without an Anthropic account? Yes, through Claudexia. The gateway issues its own keys (sk_cdx_…), no Anthropic signup needed.

MCP servers and skills — supported? Fully. Claudexia is transparent to the MCP protocol, so serenity, gitnexus, firecrawl and all your other MCP servers behave exactly as they do on a native Anthropic key.

Older Windows? Anthropic officially supports Windows 10+ and Server 2019+. On Windows 7 the CLI usually won't even start — use macOS or Linux instead.

Key format? Claudexia uses sk_cdx_…. Native Anthropic sk-ant-… keys also work if you happen to have one — but the whole point of Claudexia is not having to deal with Anthropic directly.

Region restrictions on Claudexia? No. The gateway is reachable from any country, including those Anthropic blocks.