How to Get a Claude API Key in the Claude Console (Anthropic)
TL;DR: Create a Claude API key in the Claude Console (platform.claude.com); it is shown only once, and every request needs the x-api-key and anthropic-version headers.
Claude API keys are created in the Claude Console at platform.claude.com. The key is shown only once, so read the steps before you click. This guide also covers supported regions, usage tiers and the headers every request needs.
Count Claude tokens and cost →All guides
Before you start: supported regions
Anthropic’s “Supported regions” list does not include mainland China, Hong Kong or Macau (Supported regions).
Create the key
- Sign in to (or create an account on) the Claude Console:
https://platform.claude.com. - Open the API keys page (
platform.claude.com/settings/keys) and click Create key. - Give it a name and choose an expiration. Under Linked account pick yourself (a personal key) or a service account; optionally choose a workspace.
- Copy the key immediately. It starts with
sk-ant-(for examplesk-ant-api03-…) and is shown only once — if you lose it, create a new one.
If the Create key button is greyed out, your role does not have permission — ask an organization admin. Workspace keys are a legacy key type; new keys are personal keys or service-account keys (Get an API key).
Billing and usage tiers
New organizations may start on an Evaluation tier with lower-than-standard limits. Standard tiers have monthly spend limits and move up automatically with usage history; you can also click “Request tier increase” on the Rate limits page in the Console (Rate limits).
| Tier | Monthly spend limit |
|---|---|
| Start | $500 |
| Build | $1,000 |
| Scale | $200,000 |
| Custom | Custom |
The official pages we checked do not state a free credit, a minimum top-up or the accepted payment methods. Before you top up, paste a typical prompt into the token counter and estimate a month of traffic with the LLM cost calculator.
Base URL and headers
- Base URL
https://api.anthropic.com; messages endpointPOST /v1/messages. - Auth:
Authorization: Bearer <key>(x-api-keyis the legacy alternative). - Required:
anthropic-version(for example2023-06-01) andcontent-type: application/json. - A key that spans several workspaces also needs the
anthropic-workspace-idheader (API overview).
Hello world
Replace YOUR_MODEL_ID with a current model ID from Anthropic’s models documentation. The pages we checked name the model families (Claude Opus 5.5, Sonnet 5.5, Haiku 5.5) but not the exact API ID strings, so we do not guess one here.
export ANTHROPIC_API_KEY="paste-your-key-here" # starts with sk-ant-; never commit it
curl https://api.anthropic.com/v1/messages \
-H "Authorization: Bearer $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Say hello in one sentence."}]
}'
# Legacy alternative auth header: -H "x-api-key: $ANTHROPIC_API_KEY"
Common gotchas
- Lost the key? It is displayed only once. Create a new key and delete the old one.
- Missing
anthropic-version. It is a required header on every request. - Greyed-out button. Your Console role cannot create keys; an admin has to.
- Low limits on a new org. You may be on the Evaluation tier; limits rise with usage history or via “Request tier increase”.
- Storage. Anthropic recommends keeping keys in a secrets manager and using
ANTHROPIC_API_KEY, which the SDKs read automatically. Put the key in an environment variable, keep it out of Git and out of any code that runs in a browser or mobile app, and replace it if it is ever exposed. The API keys overview has the full checklist.
FAQ
Does a Claude API key expire?
You choose an expiration when you create the key in the Console.
Can I see an existing key again?
No. Claude keys are shown only once, at creation. If you lose one, create a new key and delete the old one.
Personal key or service account key?
A personal key is linked to you; a service-account key is linked to a service account, which suits shared production systems. Both are created from the same Create key dialog.
Sources
Vendor features and prices were checked against these official pages on 2026-10-20. Products change; if something here no longer matches, the official page is right.
- Claude Docs — Get an API key
https://platform.claude.com/docs/en/get-api-key - Claude Docs — Supported regions
https://platform.claude.com/docs/en/api/supported-regions - Claude Docs — API overview
https://platform.claude.com/docs/en/api/overview - Claude Docs — Rate limits
https://platform.claude.com/docs/en/api/rate-limits