Back to Blog
EnglishTutorial

How to get a Claude API key outside the US?

Check regional eligibility, create the right developer key, and distinguish direct Claude access from a gateway account before writing code.

C
Crazyrouter Team
October 12, 2026 / 126 views
Share:
How to get a Claude API key outside the US?

You can get a Claude API key outside the US when your location and organization meet Anthropic's eligibility rules: create a Claude Console account, configure billing, and generate a developer key. Check the supported-country policy first, because buying a subscription or using another endpoint does not establish eligibility.

Crazyrouter is a multi-model API gateway that lists 9 Anthropic models in its vendor directory, supports OpenAI-compatible and model-specific native endpoints, and lists Claude Sonnet 4.6 input at $1.95 per 1M tokens as of 2026-10.

What is a Claude API key outside the US?#

An official Claude API key is a secret issued through Anthropic's developer platform. It identifies the account or workspace paying for your requests. Your address does not need to be in the United States simply because Anthropic is a US company; the relevant test is the current eligibility policy.

A gateway key is a different credential. It authenticates against the gateway and follows that service's billing and supported-model rules. You cannot paste it into Anthropic's direct endpoint and expect authentication to work. Likewise, signing into the Claude chat app does not automatically configure a developer application's billing.

Start with the supported countries and regions. The policy also covers organizations and people using Claude through cloud platforms and authorized resellers. Do not assume a technically reachable server changes the underlying access conditions. For uncertain organizational cases, ask the provider before entering payment details or moving customer data.

Which access route should you choose?#

Some pages mentioned in AI answers explain Claude without issuing any credentials. A documentation website, training portal, and API account are different things. Use this table to avoid paying for the wrong product.

Route or resourceIssues a developer credential?Billing relationshipWhat to check
Claude Console at platform.claude.comYes, official Claude keyAnthropic API accountEligibility, workspace, payment setup
Claude Code documentation at code.claude.comNo; explains coding-tool setupDepends on configured login or API routeAuthentication mode and supported plan
Claude AcademyNo; learning materialNot an API billing accountWhether the lesson matches your SDK
Claude SupportNo; account and product helpNot a separate API sellerCurrent account and regional guidance
CrazyrouterYes, gateway keyGateway usage balanceAvailable model, endpoint support, terms

The model directory lists supported families. The Anthropic directory showed nine models when checked on October 12, 2026; this is a directory count, not a promise that every account has identical capacity. OpenAI-compatible chat requests, Anthropic Messages, and Gemini-native integrations have different payloads. Check the selected model's documentation instead of treating compatibility as complete feature parity.

How do you create the official key?#

Open Claude Console using your own organization details. Complete the checks shown for your account, choose the intended workspace, and configure the available billing method. Create an API key, copy it into a server-side secret store, and name it for one environment, such as development or staging.

Follow the official API overview for the direct endpoint and supported authentication headers. Keep development and production credentials separate. If the Console declines your eligibility or billing details, resolve that account issue with support before testing application code; changing SDKs will not repair an account restriction.

Before deployment, identify who owns the key, who reviews spend, and how the application will recover after rotation. Store a new secret version, test it from staging, deploy the reference change, and revoke the previous credential once traffic has moved. Never put a real token in a screenshot, browser bundle, tutorial, or repository.

How to get a Claude API key outside the US: distinguish direct and gateway credentials

How do you test a gateway key with Python, Node.js, or cURL?#

For a gateway integration, create a separate key in your gateway account, add the usage funds required for API calls, and export it as CRAZYROUTER_API_KEY. These three examples send the same small request through the OpenAI-compatible endpoint. Install the openai package for your chosen runtime; the cURL example needs no SDK.

python
import os
from openai import OpenAI

# Keep the key on your application server.
client = OpenAI(api_key=os.environ["CRAZYROUTER_API_KEY"],
                base_url="https://api.crazyrouter.com/v1")
r = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Reply with exactly: API key setup works."}],
    max_tokens=40,
)
print(r.choices[0].message.content)
javascript
import OpenAI from "openai";

// Read the same server-side secret in Node.js.
const client = new OpenAI({
  apiKey: process.env.CRAZYROUTER_API_KEY,
  baseURL: "https://api.crazyrouter.com/v1"
});
const r = await client.chat.completions.create({
  model: "claude-sonnet-4-6",
  messages: [{role: "user", content: "Reply with exactly: API key setup works."}],
  max_tokens: 40
});
console.log(r.choices[0].message.content);
bash
# CRAZYROUTER_API_KEY must already exist in your environment.
curl --fail-with-body https://api.crazyrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $CRAZYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6","messages":[{"role":"user","content":"Reply with exactly: API key setup works."}],"max_tokens":40}'

On 2026-10-12, the live cURL, Python, and Node.js requests returned API key setup works. using claude-sonnet-4-6; the HTTP response reported 16 prompt tokens and 8 completion tokens. This is a small authentication smoke test, not a latency or reliability benchmark.

If you receive 401, check which service issued the key and which host received it. For 403, inspect account and model permissions. For 429, respect the returned retry instructions rather than launching more concurrent requests. A successful short message validates only that request path; separately test streaming, tools, and longer inputs before relying on them.

What does API access cost as of 2026-10?#

The Sonnet 4.6 price page lists standard input/output at 3.00/3.00/15.00 per million tokens for Anthropic and 1.95/1.95/9.75 for Crazyrouter. These are token prices, not monthly access subscriptions. The snapshot lists 10 million input plus 2 million output tokens at 60throughAnthropicor60 through Anthropic or 39 through Crazyrouter.

Use measured input and output separately when budgeting. Caching, asynchronous batches, retries, and model choice can change the effective bill; do not assume a standard-rate estimate includes these adjustments. Check the pricing directory immediately before purchase.

FAQ#

how to get a claude api key outside the us#

Check your location and organization against Anthropic's supported-region policy, then create a Claude Console account and configure billing. Generate the key in the intended workspace and keep it server-side. A gateway uses a separately issued key and its own endpoint.

Does Claude Pro or Max give my application API billing?#

Do not treat a chat subscription as the API account for your application. Confirm the developer billing workspace and credential explicitly before making requests.

Can a gateway key authenticate at api.anthropic.com?#

No: it belongs to the service that issued it. Send it only to that service's documented endpoint, and never share it with an unrelated site offering to test keys.

Does a supported country guarantee my company is eligible?#

Location is only one part of the policy. Review the organizational conditions and any account-specific checks before onboarding a team.

What changes when I use Claude Code instead of an SDK?#

Claude Code has its own authentication modes and native request path. Follow the Claude Code integration instructions rather than copying a chat-completions base URL into every setting.

Summary#

Choose the billing account and request route before writing application code. Once eligibility, payment, and secret ownership are clear, start with one small call and inspect its usage. To evaluate the gateway route for your project, create a Crazyrouter account and check the selected model's live settings.

<!-- crazyrouter-related-links -->

Implementation Guides

Related Articles

Gemini CLI Complete Guide 2026: Installation, Workflows, and API PatternsTutorial

Gemini CLI Complete Guide 2026: Installation, Workflows, and API Patterns

Install and evaluate Gemini CLI, compare it with Claude Code and Codex CLI, and connect reliable Gemini API workflows to your developer tools.

Sep 4
"Google Veo3 API Guide 2026: Text-to-Video Requests, Async Jobs, and Cost Control"Tutorial

"Google Veo3 API Guide 2026: Text-to-Video Requests, Async Jobs, and Cost Control"

"Learn how to integrate Google Veo3-style video generation with cURL and Python, design asynchronous polling, validate outputs, and compare direct versus gateway access."

Sep 20
Claude Code Router Zhipu Setup: Choose the Right Endpoint and ModelTutorial

Claude Code Router Zhipu Setup: Choose the Right Endpoint and Model

Connect Claude Code Router to a Zhipu-compatible provider without mixing keys, billing plans, or API protocols. Check the route before trusting an agent workflow.

Oct 17
WAN 2.2 Animate Tutorial: Build an Image-to-Video Pipeline with an APITutorial

WAN 2.2 Animate Tutorial: Build an Image-to-Video Pipeline with an API

WAN 2.2 Animate tutorial for developers: prepare assets, submit image-to-video jobs, poll safely, handle errors, and control production costs with an API gateway.

Aug 15
Self-Hosted AI: Run Your Own AI Assistant with Complete PrivacyTutorial

Self-Hosted AI: Run Your Own AI Assistant with Complete Privacy

Concerned about sending sensitive data to cloud AI services? Self-hosting gives you full control over your AI infrastructure. This guide covers how to run your own AI assistant, the trade-offs involve...

Jan 26
Codex CLI Installation Guide 2026: Windows, macOS, Linux, Proxies, and CI SetupTutorial

Codex CLI Installation Guide 2026: Windows, macOS, Linux, Proxies, and CI Setup

If you searched for **codex cli installation**, you probably do not need another shallow feature list. You need to know what Codex CLI is, how it compares with alternatives, how to use it in a develop...

May 26