A Claude API key comes from one of two places: the Claude Console at platform.claude.com, or the Claudexia dashboard. Both keys work for direct API calls and for most IDEs and agents, but each has its own format, its own base URL and its own cost of entry. Below are both routes, then the places a finished key goes: environment variables, the Python and Node SDKs, Claude Code, Cursor and any OpenAI-compatible client.
Claude Console: what it is and how it differs from Claude Pro
The Claude Console is the developer dashboard at platform.claude.com. It used to live at console.anthropic.com, and that address now redirects to the new one. You create API keys there, buy credits and watch usage. Searches for "claude console", "claude platform" and "Anthropic Console" all end up in the same place.
api.anthropic.com is something else: the base URL of the API itself, where SDKs send requests such as POST /v1/messages. It is an endpoint, not a site you sign in to.
Claude Pro is a different product. According to Anthropic's help center, paid Claude plans and the Console are separate products built for different jobs: a subscription covers Claude on the web, desktop and mobile apps, while the API is billed separately. The help center is explicit about Pro: the plan does not include API usage through the Console. Monthly API credits come with the Max, Ultra and Team plans, not with Pro or the free plan, and they do not cover Claude Code.
| Claude Pro | Claude Console | |
|---|---|---|
| What it is | a subscription to the Claude chat and apps | a dashboard for the API: keys, credits, usage |
| How you pay | a monthly plan fee | prepaid credits, bought before you use them |
| What you get | Claude in the apps with higher usage limits | an sk-ant-... key and model access from your own code |
| When the money runs out | you hit your plan's limits | API calls and the playground stop until you top up |
So the search "claude pro api" has one answer: a subscription comes with no key. A paid Pro does not fund the Console, and a funded Console does not open Pro chat. If you need a key for your own code, an SDK or a third-party tool such as Cursor, Pro is the wrong product. The cost comparison is in Claude Pro vs Claude Max vs API.
Route 1: a key from the Anthropic Console
Keys live on the API keys page of the Console, platform.claude.com/settings/keys. Sign in, click Create key, name it, pick an expiration and decide whether the key is linked to you or to a service account. Anthropic offers three types: a personal key, a service account key, and a workspace key, which is a legacy key with no owner. Use a personal key for your own development and a service account key for anything shared.
The Console shows the full key, which starts with sk-ant-, exactly once, at creation. Miss the moment and you create a new one. Anthropic's quickstart also describes a second way to authenticate, signing in with its ant command-line tool, after which the SDKs find the credentials on their own. This article sticks to keys, since that is what most third-party tools ask for.
export ANTHROPIC_API_KEY="sk-ant-api03-..."
How to top up the Console
Credits are bought on the Billing page, platform.claude.com/settings/billing: click Buy credits and enter an amount. The button is available to the Admin and Billing roles. Credits appear at once, expire one year after purchase and are non-refundable. When they run out, API calls and the playground stop until you add more. Auto-reload exists, and organizations can arrange monthly invoicing through Anthropic sales; those invoices come from Stripe.
Why a Console top-up fails in unsupported regions
Creating the key is rarely the problem. Trouble starts when you buy credits, and there are two causes of different reliability.
Confirmed by Anthropic. The API and the developer platform are offered only in the countries and regions on Anthropic's Supported Regions Policy page, and anything not listed is unsupported. Russia is not on the list, and neither is Belarus. Many countries in the Middle East, Africa, Asia and Latin America are, so check your own country before blaming policy: there the obstacle is usually the payment. The policy, effective 12 November 2026, also treats as unsupported the use by people who are physically located outside the list, and by companies incorporated, headquartered or controlled there. Without credits on the balance, API calls do not run. Those can be bought credits or the monthly credits that come with the Max, Ultra and Team plans.
Not named officially. Anthropic's billing help covers credits and Stripe invoices. It does not list accepted cards and says nothing about the region of the billing address. What is known about declined cards comes from user reports, not from Anthropic.
Reported by users. Cards issued in many countries outside the supported list are declined when buying credits, and sign-up can check the country of your IP address and your phone number.
That makes two separate questions. A declined card is a payment problem. The list of countries is a condition of access, and a successful payment does not cancel it. We do not promise that the Console will work from an unsupported region with any payment method. The mechanics of declines, and what does and does not get through, are covered in How to Access Claude API from Russia and Why Russian cards are declined by Anthropic. The first is written for one country, but the payment logic is the same elsewhere.
Route 2: a Claudexia key
Claudexia issues its own key, compatible with the Anthropic SDK request format, with no link to an Anthropic account and no region or phone check. Instead of buying credits in the Console, you top up a Claudexia balance. Three steps:
- Register in the dashboard with a login and password, or with Google, GitHub or Telegram. There is no email confirmation, so access opens at once.
- Top up the balance from $1 with any accepted method: Russian-issued cards through YooKassa or Platega, SBP (the Russian instant bank-transfer system), or crypto through CryptoCloud, CryptoBot in Telegram or the 2328 service (USDT, BTC, ETH, TON and others). The money lands after the payment is confirmed.
- Open the API Keys section and create a key. It looks like
sk_cdx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
If you live outside Russia, crypto is the method that does not depend on a bank. Paying for API access with crypto covers when it beats a card and what to watch.
A Claudexia balance is not linked to the Anthropic Console: it is a separate account, and the sk_cdx_... key works only against api.claudexia.tech. Claudexia does not sell Claude Pro or Max subscriptions, and a gateway does not cancel Anthropic's regional policy. Current models and rates are on the models and pricing pages.
export ANTHROPIC_API_KEY="sk_cdx_YOUR_KEY"
export ANTHROPIC_BASE_URL="https://api.claudexia.tech"
Where to put a finished key
From here on it does not matter where the key came from. Connecting it to code and tools works the same way, and only the key and the base URL change.
Environment variables
The simplest and most portable option: set the key and the address once in the environment, and your code and command-line tools pick them up.
# Linux / macOS
export ANTHROPIC_API_KEY="sk_cdx_YOUR_KEY"
export ANTHROPIC_BASE_URL="https://api.claudexia.tech"
# Windows PowerShell
$env:ANTHROPIC_API_KEY = "sk_cdx_YOUR_KEY"
$env:ANTHROPIC_BASE_URL = "https://api.claudexia.tech"
Python SDK
In the Anthropic SDK the Claudexia base URL has no /v1: the SDK appends /v1/messages itself.
import anthropic
client = anthropic.Anthropic(
api_key="sk_cdx_YOUR_KEY",
base_url="https://api.claudexia.tech",
)
message = client.messages.create(
model="claude-sonnet-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)
Node and TypeScript SDK
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: "sk_cdx_YOUR_KEY",
baseURL: "https://api.claudexia.tech",
});
const message = await client.messages.create({
model: "claude-sonnet-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
const block = message.content[0];
if (block.type === "text") {
console.log(block.text);
}
OpenAI-compatible clients
If your code already speaks the OpenAI Chat Completions format, the same key works there too. This is the one place the address ends with /v1.
from openai import OpenAI
client = OpenAI(
api_key="sk_cdx_YOUR_KEY",
base_url="https://api.claudexia.tech/v1",
)
response = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
Claude Code
Claude Code takes the address and the key from ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, again without /v1. Models are set with the ANTHROPIC_DEFAULT_* lines.
export ANTHROPIC_BASE_URL="https://api.claudexia.tech"
export ANTHROPIC_AUTH_TOKEN="sk_cdx_YOUR_KEY"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5[1m]"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-sonnet-5"
claude
Keep the ANTHROPIC_DEFAULT_* lines. Without them Claude Code asks for its own default models and answers “There's an issue with the selected model”.
To avoid exporting variables on every launch, store them in ~/.claude/settings.json. The full instructions for Linux, macOS and Windows, including the permanent configuration file, are in Claude Code without an Anthropic account and in the Claude Code docs.
Cursor
Cursor takes the key in a different place. In Settings, then Models, turn on the OpenAI API Key option and paste your sk_cdx_ key there. Then turn on Override OpenAI Base URL and enter https://api.claudexia.tech/v1. A key from another provider will not work in these fields.
A custom endpoint in Cursor works only on a paid Pro plan or higher; the seven-day Pro trial does not accept it. Cursor also does not take its own model names with a third-party key, so Claude and GPT models have separate names there. The name table and the usual connection errors are in the Cursor docs and in How to Use Claude Sonnet 5 in Cursor IDE via Claudexia.
Keep the key out of your repository
A key pasted into source code ends up in git history sooner or later. Put it in an environment variable or a .env file that your .gitignore excludes, and give each project its own key so you can rotate one without touching the others.
FAQ
Can I get an Anthropic key for free?
Creating the key costs nothing, but the tokens do. According to Anthropic's help center, the API runs on prepaid credits and calls fail once the balance is empty. Buying them is not the only route: the Max, Ultra and Team plans include monthly API credits, which are spent first, so a subscriber does not have to buy any while they last. Pro and the free plan get no such credits, and we found no promise of free credits for new accounts in the documentation.
Does a Claude Pro subscription include the API?
No. Anthropic's help center says the Pro plan does not include API usage through the Console. The subscription and the API are separate products with separate billing.
Where can I buy a Claude API key?
With Anthropic you create the key in the Console and buy credits on the Billing page. With Claudexia you create the key in the dashboard after registering and topping up, paying by local card, SBP or crypto.
How does a Claudexia key differ from an Anthropic key in what it can do?
The request format is compatible with the Anthropic SDK, so calling Claude models looks identical. The differences are the base URL, the payment methods (cards, SBP and crypto instead of an international card only) and the absence of any Anthropic account requirement.
What if a tool rejects the key format?
Check that the tool expects the format you pasted: sk-ant-... for fields built for the Anthropic API, and sk_cdx_... for fields where you set api.claudexia.tech. Do not mix them, because each format belongs to its own server.
Where does the key go if I use another SDK or language?
Almost any SDK that speaks the Anthropic or OpenAI format takes a key and a base URL as client parameters, like the examples above. The parameter names differ (api_key and apiKey, base_url and baseURL), but the rule is the same: pass the address and the key together.
Should I create several keys for different projects?
One key per project makes rotation and cost tracking easier. In Claudexia a key has a name, a channel (Premium or Cheap), an optional Premium fallback for Cheap and an expiry. Per-model and spend limits cannot be set through the key API. More in the API key guide.
What happens if I lose the key I copied?
The full key value is shown only once, when you create it, and cannot be recovered. Create a new key, update it in your code and tools, then delete or freeze the old one.