> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ruapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code without a subscription: API key and pay-per-token from Russia

> Can you use Claude Code without a Claude Pro or Max subscription: how to connect it with a RuAPI API key, which is cheaper — a subscription or paying per token, which models to pick, and how to pay from Russia in USDT without a VPN.

**Short answer:** you don't need a Claude Pro or Max subscription to use Claude Code. Instead of signing in to an Anthropic account, Claude Code accepts an API key — and you pay for the tokens you use instead of a monthly fee. From Russia, a subscription is hard to get: it requires an Anthropic account (Russia is not on the list of supported countries) and a card from a foreign bank. With a RuAPI key, two environment variables are enough: you pay in USDT from 5 USDT, no VPN, prompt caching works, and besides Claude you can use the cheaper DeepSeek models.

## Subscription or API key: what's the difference

| | Claude Pro / Max subscription | RuAPI API key |
| - | - | - |
| How you pay | Pro \$20/month, Max from \$100/month, with usage limits | Only for the tokens you use |
| How you sign in | Anthropic account (`/login`) | Key in `ANTHROPIC_AUTH_TOKEN`, no Anthropic account needed |
| Access from Russia | Only with a VPN, and it's risky: since October 2026 there has been a new wave of bans, including paid accounts | Directly, no VPN |
| Payment | Russian cards are not accepted | USDT / USDC from 5 USDT; cards from foreign banks are accepted too |
| Models | Claude only | Claude Opus, Sonnet, Haiku, plus DeepSeek |

> [!NOTE]
>
> Subscription prices are from [claude.com/pricing](https://claude.com/pricing) (checked 15 October 2026). The country list is on the [Supported Regions Policy](https://www.anthropic.com/supported-countries) page (checked 22 October 2026). Reports of bans come from The Moscow Times and The Bell, October 2026.

## How to connect Claude Code with an API key

**1. RuAPI key**

Sign up at [www.ruapi.ai](https://www.ruapi.ai/?lng=en\&utm_source=docs\&utm_campaign=en-claude-code-without-subscription) — with email, Google or Yandex. Top up your balance in Console → **Wallet**, then open **API Keys** → **Create API key** — you'll get an `sk-...` string.

**2. Address and key in settings.json**

Open `~/.claude/settings.json` (Windows: `%USERPROFILE%\.claude\settings.json`; create the file if it doesn't exist) and add:

```json theme={null}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://www.ruapi.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-RuAPI-key",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
  }
}
```

The address goes **without** `/v1` at the end. `ANTHROPIC_API_KEY` works too, but with it Claude Code asks on first launch whether to use the key — answer "no" by accident and requests will bypass RuAPI. `ANTHROPIC_AUTH_TOKEN` doesn't trigger that question.

**3. Launch**

If Claude Code used to run on a subscription, run `/logout` in it first, otherwise it will warn about `Auth conflict`. Then open a new terminal and run `claude` in your project folder: in `/status`, the `Anthropic base URL` line should show `https://www.ruapi.ai`.

Installing via npm and errors like "Unable to connect to Anthropic services" are covered in [Claude Code in Russia](/en/claude-code-russia.md).

## Which is cheaper: a subscription or paying per token

At every step, an agent re-sends the whole task context to the model, so the bill depends on how many steps you take and whether the cache is hit. Two reference points at RuAPI prices:

* **One step** with 100,000 tokens of context on Claude Sonnet 5.5: input costs about \$0.018 with a cache hit and \$0.24 without one, plus output ([the math](/en/claude-code-cline-costs.md)).
* **One real day of Claude Code work** — 405 million tokens, 97.5% of them cache reads — would cost about \$86 on `claude-sonnet-5-5` and \$8.39 on `deepseek-flash` ([the breakdown](/en/deepseek-vs-claude.md)).

What follows from this:

* **Light or uneven usage** — paying per token is cheaper: you pay only for the days you work. If your month adds up to less than \$20, that beats even Pro.
* **The agent runs all day, every day** — at a load like the one in the breakdown above, Claude Sonnet tokens will cost more than a Max subscription. But from Russia, a subscription has to be paid with a card from a foreign bank and used over a VPN, with the risk of the account being blocked along with the month you paid for. You can cut a token bill in other ways: hand routine work to `deepseek-flash`, subagents to Haiku 5.5, and run `/clear` between tasks — more in [How to cut your Claude Code and Cline bill](/en/claude-code-cline-costs.md).

Checking it on your own work is easy: top up 5–10 USDT, work for a week as usual and look at the total in Console → **Usage Logs**. The amount in `/usage` is only an estimate: Claude Code calculates it itself at Anthropic's list prices, not RuAPI's. To keep the agent from spending more than you planned, create a separate key for it with a limit.

## Prompt caching

Claude Code connects to RuAPI through the native Anthropic API and sets the cache markers itself, so caching works without any setup: re-sent context costs at least 10× less than regular input. The cache lives for 5 minutes after the last request — after a long break, the first request writes the context to the cache again. `/usage` shows the cache share in the `Prompt cache (main)` line. More in [Prompt caching](/en/prompt-caching.md).

## Which models to pick

| Model | Input | Cache read | Output | When to use |
| - | - | - | - | - |
| `claude-opus-5-5` | \$4.80 | \$0.24 | \$24 | The hardest tasks |
| `claude-sonnet-5-5` | \$2.40 | \$0.12 | \$12 | Main model |
| `claude-haiku-5-5`, request up to 100,000 tokens | \$0.12 | \$0.012 | \$0.60 | Subagents, short tasks |
| `claude-haiku-5-5`, request over 100,000 tokens | \$0.60 | \$0.06 | \$3 | |
| `deepseek-flash` | \$0.168 | \$0.012 | \$1.44 | Routine work — many times cheaper than Claude |

Prices per 1M tokens on the pricing page as of 23 October 2026; the price in your account may be lower. Haiku 5.5 has two tiers, just like at Anthropic: if the request, cache included, is longer than 100,000 tokens, the whole request is billed at the higher tier. Switch models in a session with `/model`, for example `/model deepseek-flash`; to move Claude Code to DeepSeek entirely, see [Claude Code on DeepSeek](/en/integrations/claude-code-deepseek.md).

## How to pay from Russia

* **USDT or USDC** on TRC20, BEP20 or Polygon, from 5 USDT — no foreign card needed. No USDT yet? [Buy it with rubles via SBP (Faster Payments System)](/en/buy-usdt.md): the first time takes 15–30 minutes.
* **Cards from foreign banks** (Visa / Mastercard) are accepted too. Cards from Russian banks, including Mir, are not.
* There's no monthly fee: you top up whenever you need to, and the unused balance [doesn't expire](/en/legal/refund.md).

## FAQ

> **Can I use Claude Code without a subscription?**
>
> Yes. Claude Code also works with an API key: set the address `https://www.ruapi.ai` and your RuAPI key, and pay only for tokens. You don't need an Anthropic account, a subscription or a VPN.

> **Where do I get an API key for Claude Code?**
>
> A key from the Anthropic Console is hard to get and pay for from Russia — more in [Claude API key in Russia](/en/claude-api-key-russia.md). A RuAPI key is created in Console → **API Keys** right after you sign up; put it in `ANTHROPIC_AUTH_TOKEN` together with `ANTHROPIC_BASE_URL`. An Anthropic `sk-ant-...` key doesn't work with the RuAPI address.

> **How do I buy Claude Code in Russia?**
>
> The program itself is free and installs via npm: `npm install -g @anthropic-ai/claude-code`. What you pay for is the models — with an Anthropic subscription (from Russia, only with a VPN and a card from a foreign bank) or per token. On RuAPI, that means topping up your balance in USDT, from 5 USDT.

> **Can I try it for free?**
>
> We usually give new users \$0.05 right away to try deepseek-flash — and you can [run Claude Code on DeepSeek](/en/integrations/claude-code-deepseek.md). Claude models unlock after your first top-up — from 5 USDT.

> **Are these the original Claude models?**
>
> Yes. These are Anthropic's original models — claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5 and others — with no quality cuts and no substitution.

## Next steps

> **[Claude Code in Russia](/en/claude-code-russia.md)**
>
> Installing without a VPN and fixing errors.

> **[Cutting your Claude Code and Cline bill](/en/claude-code-cline-costs.md)**
>
> Caching, model choice, short context.

> **[Claude Code on DeepSeek](/en/integrations/claude-code-deepseek.md)**
>
> The same Claude Code — many times cheaper.

> **[Claude Code in Russia — no VPN, no account](https://www.ruapi.ai/claude-code-v-rossii?lng=en\&utm_source=docs\&utm_campaign=en-claude-code-without-subscription)**
>
> Why Claude Code is better connected through a gateway from Russia.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.