Claude API in Russia: Get a Key and Test Your First Request

From Russia, you can send requests to Claude through BetterToken's Anthropic-compatible API. You need your own BetterToken account, a positive balance, and an API key. Connecting to the BetterToken API works without a VPN and does not require a foreign virtual card. Below is a minimal Anthropic Messages API request and a way to verify the result in Dashboard.

1. Create an account and API key

  1. Sign up at bettertoken.ai.
  2. Add funds and confirm that the amount appears in Dashboard.
  3. In the Your API keys section, click Create API key.
  4. After creating the key, copy the API key and Base URL from the setup window. Store the key in a secret manager or a local .env file, and never add it to Git.

BetterToken uses Pay-as-you-go billing: there is no fixed monthly subscription, and paid balance does not reset at the end of the month. The BetterToken quickstart includes the current step-by-step screens.

2. Choose the Anthropic-compatible Base URL

For an Anthropic-format request, use:

https://www.bettertoken.ai

The Base URL for the Anthropic SDK and Claude Code remains https://www.bettertoken.ai, without a /v1 suffix. In a raw HTTP request, however, the protocol version is part of the path. The full Messages API URL is https://www.bettertoken.ai/v1/messages. The Anthropic SDK appends this path automatically.

3. Send the first request

export ANTHROPIC_API_KEY="your_bettertoken_api_key"
export ANTHROPIC_BASE_URL="https://www.bettertoken.ai"

curl --fail-with-body "$ANTHROPIC_BASE_URL/v1/messages" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "ping"}]
  }'

The line -H "x-api-key: $ANTHROPIC_API_KEY" reads the value from the environment variable; it does not embed the key in the request text. Replace only the your_bettertoken_api_key placeholder in your local session. Do not publish the command after inserting a real key.

Model IDs change. Before sending the request, check the current model on the BetterToken pricing page and in the API Reference.

4. Verify the response and token usage

A successful request returns HTTP 200 and a JSON message object. Check three fields:

  • type is message;
  • the content array contains the model response;
  • the usage object contains input and output token counts.

The official Anthropic Messages API documents the response shape.

Next, open BetterToken Dashboard and find the request by time. Its record shows the model, request status, input/output/cache tokens, and the corresponding charge. This verifies both the curl response and the actual usage record.

5. Fix common errors

  • 404 or an incorrect route. A raw Anthropic-compatible HTTP request uses /v1/messages. The /messages path is incomplete.
  • 400. Check anthropic-version, content-type, model, max_tokens, and the messages array.
  • 401 or 403. Check the API key, its selected group, and the Base URL. Never send the key to support or include it in a screenshot.
  • 429. Read the response body and retry only after the indicated pause. Separately check the balance and request history in Dashboard.

If variables from another provider remain in the current shell session, clear them before configuring the request again:

unset ANTHROPIC_API_KEY
unset ANTHROPIC_BASE_URL

How this access differs from a subscription or shared account

  • The official list of Claude API supported regions does not include Russia.
  • A Claude.ai subscription and API access are separate products: a web subscription does not replace an API key.
  • BetterToken does not sell shared Claude.ai accounts. You use your own BetterToken account and an API key you created yourself.

To begin, create a BetterToken account, issue an API key, and check the Base URL and model again in the current documentation before sending the request.