Claude Code in Russia: installation and use without an Anthropic subscription
Install Claude Code, point it at a gateway with two variables and pay per token by SBP, MasterCard or crypto. Plus the first-run errors and how to fix them.
5 min · · IDE · агенты
Claude Code is a console agent for development: it reads the project, edits files and runs commands right in the terminal. The question of Claude Code in Russia usually comes down not to installation but to access and payment: a foreign card, an account and a subscription. Below is a path without an Anthropic subscription: we install the program and connect it to a gateway with two environment variables, paying per token. Access from Russia works through the gateway, with payment by SBP, MasterCard or crypto.
What you need
- A terminal: macOS, Linux, Windows (PowerShell, CMD or WSL).
- A key like
fetch_.... It is created on the API keys page after topping up the balance (from $1). The full key is shown once. - A couple of minutes for setup. With this connection Claude Code does not use a paid Anthropic account: tokens are paid from the gateway balance.
Topping up via SBP is described step by step in paying through SBP; the payment page adds an 8.5% fee on top.
Step 1. Installing Claude Code
Always check the official Claude Code documentation, the Setup section, for current commands: methods and versions change. At the time of writing the official documentation offers the following.
macOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexAn npm alternative (needs Node.js 22 or newer, do not use sudo):
npm install -g @anthropic-ai/claude-codeOpen a new terminal window and check:
claude --version
claude doctorclaude --version prints the version number, claude doctor prints installation diagnostics. If the shell cannot find claude, the install folder is not on your PATH: the documentation describes how to fix it. If the installer address does not open for you, try the npm variant.
Step 2. Connecting to the gateway
Two variables are needed. The address is given without /v1: Claude Code appends the path to /v1/messages itself. And note: the key must be passed specifically via ANTHROPIC_AUTH_TOKEN.
macOS, Linux, WSL (bash or zsh):
export ANTHROPIC_BASE_URL=https://api.zukko.pro
export ANTHROPIC_AUTH_TOKEN=fetch_your_key
export ANTHROPIC_MODEL=claude-sonnet-5-5Windows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://api.zukko.pro"
$env:ANTHROPIC_AUTH_TOKEN = "fetch_your_key"
$env:ANTHROPIC_MODEL = "claude-sonnet-5-5"To avoid typing the variables each time, you can put them into the Claude Code settings file ~/.claude/settings.json in an env block (check the Settings section of the official documentation):
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.zukko.pro",
"ANTHROPIC_AUTH_TOKEN": "fetch_your_key",
"ANTHROPIC_MODEL": "claude-sonnet-5-5"
}
}Do not commit this file and do not publish the key. Step-by-step setup is in the Zukko Claude Code documentation.
Step 3. First launch
Go to the project folder and start the agent:
cd ~/my-project
claudeAsk a simple question: "Describe the structure of this project in five points." If an answer arrives, the connection works. Spending is visible on the "Usage" page in the dashboard. The next step is to describe the project rules in a CLAUDE.md file at the repository root: the agent reads it at the start of a session.
Choosing a model
The ANTHROPIC_MODEL variable sets the model. Zukko prices as of 18 October 2026, $ per 1M tokens:
| Model | Input / output | Cache read / write | Strength index |
|---|---|---|---|
claude-sonnet-5-5 | 0.4 / 2 | 0.05 / 0.5 | 48 |
claude-opus-5-5 | 0.8 / 4 | 0.08 / 1 | 58 |
An example calculation of a small session (10 requests; assumptions: 20,000 tokens of fresh input, 20,000 of cache writes, 150,000 of cache reads, 8,000 of output):
claude-sonnet-5-5: 20,000 × 0.4 + 20,000 × 0.5 + 150,000 × 0.05 + 8,000 × 2 = 8,000 + 10,000 + 7,500 + 16,000 = 41,500, i.e. $0.0415.claude-opus-5-5: 20,000 × 0.8 + 20,000 × 1 + 150,000 × 0.08 + 8,000 × 4 = 16,000 + 20,000 + 12,000 + 32,000 = 80,000, i.e. $0.08.
(Each term is divided by 1,000,000.) This is a calculation on assumptions, not a promise: real spending depends on the project. In the Anthropic format, i.e. in Claude Code, the gateway sees cache reads and writes separately, so they are billed at their own prices. More: how much a Claude Code agent costs.
Any model from the catalogue can also be called in the Anthropic format, including non-Claude ones. But agent behaviour with tools differs between models, so test the chosen one on your project. The current list is GET https://api.zukko.pro/v1/models.
Typical first-run errors
| Symptom | Cause | What to do |
|---|---|---|
| Asks to sign in to an Anthropic account | the variables are not set in this terminal window, or only ANTHROPIC_BASE_URL is set | set both variables and restart claude; see Claude Code asks to sign in to Anthropic |
| 401 | a wrong or truncated key, a stray space or newline | copy the key again; use ANTHROPIC_AUTH_TOKEN |
| 402 | not enough money on the balance | top up the balance in the dashboard |
| 404 | /v1 appended to ANTHROPIC_BASE_URL or a wrong model name | remove /v1; check against GET /v1/models |
| An unknown or unavailable model error on the first request | a typo in ANTHROPIC_MODEL: the name is only checked when the gateway is called | fix ANTHROPIC_MODEL using the GET /v1/models list |
| 429 | the key's daily or monthly limit is exhausted, or a limit at the model provider | check the key limits in the dashboard |
| 503 | the provider is unavailable or the model is disabled | retry later or pick another model |
If requests still do not go through, test the key directly:
curl https://api.zukko.pro/v1/messages \
-H "x-api-key: fetch_your_key" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5-5","max_tokens":50,"messages":[{"role":"user","content":"ping"}]}'If curl answers but Claude Code does not, the problem is in the environment variables.
Avoiding overspending
- Create a separate key for Claude Code with a daily and monthly dollar limit: if the agent loops, it hits the limit rather than draining the balance.
- Watch session length and clear the context between tasks.
- Do not hand work secrets to the agent: keep
.envoutside the project or forbid reading it in the settings.
FAQ
Do I need an Anthropic account?
No: with a connection through ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, requests go to the gateway and payment comes from the Zukko balance. The terms of the Claude Code program itself are set by Anthropic; see its documentation for current information.
How is this different from a subscription?
A subscription gives access under the service's plan, while here you pay per token, with no subscription. See the services' sites for subscription terms, we do not quote them.
Does it work in VS Code?
Yes, Claude Code can be run in the editor's built-in terminal and the environment variables work the same way.
Where do I start?
Create a key in the Zukko dashboard, set the two variables and run claude in a small project.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Claude Code in Zed: connecting an external agent to your own keyIn Zed you can open Claude Code as a terminal thread, as an external agent over ACP, or configure the built-in agent. We cover each option and connect it to your key.
- Claude Code for 1C: setting up an agent to work with a configurationThe agent edits BSL text modules, not the infobase. How to dump a configuration, what goes into CLAUDE.md, how to check edits and what it costs.
- Cursor CLI: the Cursor agent in the terminal, install and setupThe Cursor agent works in the terminal as well as the editor, with the agent command. Install it, configure it, run it in scripts and compare it with Claude Code and Codex.
- Cline in Russia: installation and model setup without a foreign cardThe Cline extension runs locally, so the only question is where model requests go and how you pay for them. Step-by-step setup with one key and a task cost estimate.