You can use Claude Code in Russia without keeping a VPN connected. Instead of connecting directly to Claude.ai or the official Anthropic API, Claude Code connects to BetterToken, an independent provider with an Anthropic-compatible API. The shortest path is straightforward: create an BetterToken account and a Claude-group API key, set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, restart Claude Code, and verify the first response.
What you need
- Claude Code installed on your computer.
- An BetterToken account with enough balance for the first request.
- An BetterToken API key from the Claude group. This is the key group used by the setup below.
Choose the key group carefully because it determines the Claude Code configuration. This guide covers only the shortest path for a Claude group key, which does not require extra model environment variables. A GPT group key needs additional model mappings and is outside the scope of this guide.
Configure Claude Code with BetterToken
- Create an BetterToken account. Open
bettertoken.aiand complete registration. - Check your balance. If it is not enough for the first request, open the Account card in the console, choose the top-up action, and confirm that the balance updates after payment.
- Create a Claude-group API key. In the API keys section, choose Create API key, enter a name, and select the Claude group. Copy the key immediately and keep it in a secure location, not in source code or a committed configuration file.
- Clear old environment variables so that they do not override your settings file:
unset ANTHROPIC_AUTH_TOKEN
unset ANTHROPIC_BASE_URL
- Open the Claude Code settings file. Its location depends on the operating system:
- macOS / Linux:
~/.claude/settings.json - Windows:
%USERPROFILE%\.claude\settings.json
- Set the Base URL and token. A Claude-group key needs no model variables because Claude Code manages model selection:
{
"env": {
"ANTHROPIC_BASE_URL": "https://bettertoken.ai",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"API_TIMEOUT_MS": "3000000"
}
}
The Base URL must be exactly https://bettertoken.ai, without /v1. Adding /v1 is one of the most common setup mistakes.
- Restart Claude Code. Close it completely and launch it again so the new settings are loaded.
If you use the Claude Code extension for VS Code, set the same four variables (ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC, and API_TIMEOUT_MS) under the extension setting claudeCode.environmentVariables instead of settings.json.
Verify the connection
Start Claude Code and send a simple message, such as asking it to explain one file in your project. A normal, useful answer confirms that the Base URL and token are working and that the request went through BetterToken. If you see an authentication error, timeout, or model-not-found response, use the checklist below.
Fix authentication errors and stale variables
Check these items in order:
ANTHROPIC_AUTH_TOKENcontains the BetterToken API key with no extra spaces or quotation marks.ANTHROPIC_BASE_URLis exactlyhttps://bettertoken.ai, with no/v1and no trailing slash.- The key belongs to the Claude group and the configuration does not contain
ANTHROPIC_MODELor other model variables. GPT-group keys use a different configuration that is not covered here. - No old
ANTHROPIC_AUTH_TOKENorANTHROPIC_BASE_URLremains in the shell environment, profile, or earlierexportcommands. Those values can overridesettings.json. If unsure, run the twounsetcommands again and restart both the terminal and Claude Code.
Following this order—from token and Base URL to key group and inherited environment variables—is usually the fastest way to isolate the problem.
Why this works without a VPN
The official Anthropic subscription is subscription-based, and access from Russia usually adds a separate VPN step. BetterToken uses pay-as-you-go billing: token usage is charged against your balance, and unused balance does not expire simply because you did not spend it immediately.
This also provides a fallback when an official Claude Code subscription limit runs out early. You can temporarily switch ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN to the BetterToken configuration from this guide and continue working without waiting for the subscription limit to reset.
Where to go next
This guide covers the basic Claude-group path from registration to the first verified response. Details such as GPT-group model IDs, CC Switch behavior, and VS Code extension settings can change faster than an article. Check the current BetterToken documentation for updates: Quick Start and Claude Code.