> ## 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: “Request not allowed” (403) and “not allowed from unsupported countries” — what they mean and how to fix them

> The Claude API and Claude Code errors “403 Request not allowed” and “Access to Anthropic models is not allowed from unsupported countries, regions, or territories”: why Anthropic rejects the request, when a VPN or proxy is to blame, and how to connect Claude without these errors — by changing the key and the address.

**Short answer:** both errors are returned by Anthropic itself. Most often the cause is the place the request came from: Anthropic only operates in the countries on its list. A new key or a new subscription won't help here. For the errors to stop, the request has to reach Anthropic from an address other than yours. That's exactly how it works with a RuAPI key: you change the key and the address — in your code or in the Claude Code settings — and the Claude models stay the same. No VPN needed.

## What the errors look like

In Claude Code and in the API — a response with code **403**:

```text theme={null}
API Error: 403 {"error":{"type":"forbidden","message":"Request not allowed"}}
```

Via Amazon Bedrock (including in Claude Code connected to Bedrock) — a response with code **400** ([example on GitHub](https://github.com/anthropics/claude-code/issues/2656)) — if an AWS region in an unsupported country is selected in the settings:

```text theme={null}
API Error: 400 Access to Anthropic models is not allowed from unsupported countries, regions, or territories.
Please refer to https://www.anthropic.com/supported-countries for more information.
```

## Why it happens

* **The request came from an unsupported region.** The list is on the [Supported Regions Policy](https://www.anthropic.com/supported-countries) page. It also says that use by people physically located outside this list is not supported either.
* **A VPN or proxy.** Anthropic sees not your address but the exit address of the VPN or proxy. If it's in an unsupported region or changes mid-session, you'll get the same error.
* **Less often — the subscription or permissions.** If you're in a supported country without a VPN, check that your subscription is active and that the key or role in the Anthropic Console has access.

## What you can do

| Situation | What to do |
| - | - |
| You're in a supported country, the VPN is off, and the error still appears | Check your subscription, your role in the Anthropic Console and your internet egress address (`curl ipinfo.io`) |
| You're in a region that isn't on Anthropic's list | Connect Claude via RuAPI — steps below. No Anthropic account or subscription needed |
| The error is shown by Claude Code | Put the RuAPI key and address into the Claude Code settings — example below |

## How to connect Claude via RuAPI

**1. Sign up**

Sign up at [www.ruapi.ai](https://www.ruapi.ai/?lng=en\&utm_source=docs\&utm_campaign=en-claude-request-not-allowed) — with email, Google or Yandex.

**2. Top up**

Console → **Wallet**: USDT or USDC (TRC20 / BEP20 / Polygon; USDT also on TON), from 5 USDT. No USDT yet? [Buy it with rubles via SBP (Faster Payments System)](https://docs.ruapi.ai/en/buy-usdt.md). Cards from foreign banks (Visa / Mastercard) are accepted too.

**3. Key**

Console → **API Keys** → **Create API key** — you'll get an `sk-...` string.

**4. Swap the key and address**

In Claude Code or in your own code — examples below.

```json Claude Code (~/.claude/settings.json) theme={null}
{
  "model": "claude-sonnet-5-5",
  "env": {
    "ANTHROPIC_BASE_URL": "https://www.ruapi.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-RuAPI-key",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
    "CLAUDE_CODE_GATEWAY_MODEL_DISCOVERY_TIMEOUT_MS": "10000"
  }
}
```

```python Anthropic SDK theme={null}
import anthropic

client = anthropic.Anthropic(
    api_key="sk-your-RuAPI-key",
    base_url="https://www.ruapi.ai",  # no /v1
)

message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(message.content[0].text)
```

```python OpenAI SDK theme={null}
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-RuAPI-key",
    base_url="https://www.ruapi.ai/v1",
)

resp = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
```

The full Claude Code guide — installation, choosing a model, signing in without an Anthropic account — is on the [Claude Code in Russia](https://docs.ruapi.ai/en/claude-code-russia.md) page.

## FAQ

> [accordion] Will a new Claude account or a new subscription help?
>
> If the cause is the region, no: Anthropic checks where the request came from, not which account you have. A new account from the same address will get the same error and the same risk of a ban.

> [accordion] Do I need an Anthropic account to work via RuAPI?
>
> No. A RuAPI key is enough: in Claude Code it goes into the settings, and signing in with an Anthropic account isn't needed.

> [accordion] Do I need a VPN?
>
> No. The RuAPI website and API are reachable directly.

> [accordion] Is this the original Claude?
>
> Yes. These are Anthropic's original models — claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5 and others — with no substitution and no quality cuts.

## Next steps

> [card] [Claude Code in Russia](https://docs.ruapi.ai/en/claude-code-russia.md)
>
> Installation and connection without an Anthropic account.

> [card] [Claude API key](https://docs.ruapi.ai/en/claude-api-key-russia.md)
>
> Where to get a key and how to pay.


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