Claude Code is Anthropic's official CLI agent. It turns the terminal into a pair programmer: it reads the repository, edits files, runs tests and opens PRs. There is one catch. From Russia it does not connect directly, because Anthropic blocks sign-ups by IP and does not accept Russian cards. What follows, in order: installation on Windows, macOS and Linux, connecting through a gateway without a VPN, and paying with SBP (the Russian Faster Payments System) or an MTS card (MTS is a Russian mobile operator).
Why Claude Code does not work in Russia directly
When you sign in through claude.ai/code, Anthropic checks three things at once: the country of your IP, whether your phone number is supported, and the country that issued your card. One signal pointing to Russia, the CIS or some other regions is enough. The account is not created, and keys that were already issued are deactivated a few days later. A VPN covers only the IP check. The phone number and the card still have to be American.
codexkey works differently. On our gateway you get an API key in the format sk_cdx_…, pay with SBP or a Russian bank card, and Claude Code speaks the same Anthropic Messages API protocol, just with a different BASE_URL. No VPN, no virtual cards, no Anthropic account.
Installing Claude Code on Windows, macOS and Linux, step by step
Windows 10/11
In PowerShell, as a regular user:
irm https://claude.ai/install.ps1 | iex
If claude.ai is blocked on your corporate network, download claude-windows-x64.exe from Anthropic's GitHub releases, put it in C:\Users\<you>\bin and add that folder to PATH. Restart PowerShell.
macOS
curl -fsSL https://claude.ai/install.sh | bash
With Homebrew:
brew install anthropic-ai/claude/claude
Linux (Ubuntu, Debian, Fedora, Arch)
curl -fsSL https://claude.ai/install.sh | bash
The script puts the binary at ~/.local/bin/claude. If that folder is not in your PATH, add this to ~/.bashrc or ~/.zshrc:
export PATH="$HOME/.local/bin:$PATH"
Check the installation with claude --version. The output should look like claude 1.x.x.
Connecting codexkey to Claude Code without a VPN
Claude Code takes the address and the key from the environment variables ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, and the models from the ANTHROPIC_DEFAULT_* lines. Put in the codexkey values, and Claude Code works in Russia with no VPN and no Anthropic account.
macOS / Linux
Add to ~/.zshrc or ~/.bashrc:
export ANTHROPIC_BASE_URL="https://api.codexkey.online"
export ANTHROPIC_AUTH_TOKEN="sk_cdx_YOUR_KEY"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5[1m]"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5"
Restart the terminal or run source ~/.zshrc. The ANTHROPIC_DEFAULT_* lines are required: without them Claude Code asks for its own default models and answers "There's an issue with the selected model".
Windows (PowerShell, persistent)
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.codexkey.online", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk_cdx_YOUR_KEY", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_OPUS_MODEL", "claude-opus-5-5[1m]", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_SONNET_MODEL", "claude-sonnet-5[1m]", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_HAIKU_MODEL", "claude-sonnet-5", "User")
Close the window and open a new one so the variables are picked up.
One session only
If you would rather not touch your profile:
ANTHROPIC_BASE_URL=https://api.codexkey.online ANTHROPIC_AUTH_TOKEN=sk_cdx_… \
ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5[1m]" ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5[1m]" \
ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5" claude
Run claude in any repository and the agent starts working through codexkey. No VPN, no proxy, no edits to the hosts file.
Where to get a codexkey API key
- Register on the sign-up page. It takes 60 seconds and needs only an email.
- Top up the balance with SBP, a Russian bank card, an MTS wallet, YooKassa, Platega or crypto (USDT/BTC/ETH through CryptoCloud and CryptoBot). There is no minimum deposit.
- In your account open "API keys" → "Create Key". Set a name, choose Premium or Cheap, and if needed an expiry date and a Premium fallback for Cheap.
- Copy the key in the
sk_cdx_…format and put it intoANTHROPIC_AUTH_TOKEN.
Which model to pick for Claude Code
You can pin a model in the CLI and in ~/.config/claude/settings.json:
{
"model": "claude-sonnet-5"
}
What to choose in Claude Code:
- Claude Sonnet 4.6: the balance of price and quality, the default for most development tasks.
- Claude Opus 4.8: long refactors and multi-module tasks, context up to 1M tokens. It costs 5 times more, but on complex PRs the gap in quality is noticeable.
- gpt-5.6-luna: quick edits, commit message generation, autocomplete. It is cheap, so it suits agents that fire many small calls.
We have Haiku too: the catalog lists claude-haiku-5.5 and claude-haiku-4.5, with prices on the models page. They run in the Premium channel, and the Cheap channel has no Haiku.
What Claude Code costs through codexkey
There is no subscription. You pay only for what you use, at a per-million-token rate for each model. An active developer who ships 30-40 PRs a week on Sonnet 4.6 spends $8-15 a month with prompt caching on. That is several times cheaper than Claude Pro ($20/mo) or Claude Max ($200/mo), unless you hit their limits all the time.
Caching cuts the bill by another 60-80%. codexkey forwards the cache_control headers as they are, so Claude Code pays for cache reads at 0.10x the normal rate.
Common Claude Code errors and how to fix them
claude does not start, command not found: the install folder did not make it into PATH. Open a new terminal. If that does not help, check echo $PATH (Linux/macOS) or $env:PATH (PowerShell).
401 Unauthorized or invalid_api_key: the key picked up a stray space, or the variable still holds an old key. Create a new key in your codexkey account, replace the variable and restart the terminal.
429 rate_limit_exceeded: check the error text and the limits of your account or of the provider channel. If Retry-After is present, respect it and send requests from the client less often. A per-key daily limit cannot be set through the dashboard key API.
getaddrinfo ENOTFOUND api.anthropic.com: the ANTHROPIC_BASE_URL variable was not picked up. Run echo $ANTHROPIC_BASE_URL; the answer must be https://api.codexkey.online. If it prints nothing, restart the editor and the terminal.
Claude Code in Cursor or the VS Code extension cannot see the key: extensions sometimes read variables only at the moment the IDE starts. Quit the editor completely (Cmd+Q on macOS, not just the window) and open it again.
FAQ
Does Claude Code work in Russia without a VPN? Yes, through codexkey. Anthropic does not see that the request comes from Russia: to it, this is an ordinary API call from the US IP of our gateway.
Do I need an Anthropic account for Claude Code through codexkey? No. codexkey issues its own keys, sk_cdx_…, and a separate Anthropic registration is not required.
Can I use Claude Code on Windows 7 or Windows Server? Anthropic officially supports Windows 10+ and Windows Server 2019+. On older systems the CLI may not start, so macOS or Linux is the better choice.
What about MCP servers and skills? Compatibility is full. codexkey passes the MCP protocol through transparently, so serenity, gitnexus, firecrawl and your other MCP servers behave the same as with a regular Anthropic key.
What is the key format? codexkey uses sk_cdx_…. A native Anthropic sk-ant-… key also works if you already have one. But the whole point of codexkey is not having to deal with Anthropic directly.