How to Get a Claude API Key (Anthropic API Key) in 2026: Where to Find It, Billing and First Call

Updated · By topai.one editorial team

Quick answer: Sign in to the Claude Console at platform.claude.com, open API keys at platform.claude.com/settings/keys, and click Create key. Name it, choose an expiration, and set the linked account. Copy the key once, store it as ANTHROPIC_API_KEY, and send one Messages API request. Steps below follow Anthropic’s Get your Claude API key page (checked November 2, 2026).

What do you need before you start?

Anthropic’s API overview (checked November 2, 2026) lists two prerequisites: a Claude Console account and an API key from the Console (or, for cloud workloads, Workload Identity Federation). A Claude.ai Pro or Max login is a different account type. It works in the Console, but the subscription itself does not include API access, except for the monthly API credits on Max and Team.

How do you create a Claude API key, step by step?

  1. Sign in to the Claude Console at platform.claude.com, or create an account if you do not have one.
  2. Open the API keys page at platform.claude.com/settings/keys.
  3. Click Create key. Name the key, select an expiration, and set Linked account to yourself or a service account. You can also select a workspace so the key is scoped to it. A personal key acts as you and stops working if you leave the organization. A service account key is the one Anthropic recommends for shared workloads such as CI or production. If Create key is disabled, your role may not allow it. Ask an organization admin to change your role or to create a service account key.
  4. Copy the key once. The Console shows the full key only once, at creation. Store it in a secrets manager. If you lose it, create a new key. This guide does not print a sample key.
  5. Set ANTHROPIC_API_KEY. Get started (checked November 2, 2026) tells you to export that environment variable. The official SDK reads it automatically. The documented cURL call sends it as x-api-key:
curl https://api.anthropic.com/v1/messages \
  -H "content-type: application/json" \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model":"claude-opus-5-5","max_tokens":1000,
       "messages":[{"role":"user","content":"Say hi"}]}'

The get-started sample uses the model claude-opus-5-5, max_tokens of 1000, and anthropic-version: 2023-06-01. The API overview also accepts Authorization: Bearer with the same key, and says x-api-key remains supported. If the key is not scoped to one workspace, include an anthropic-workspace-id header. The Python SDK path in get started is pip install anthropic, then anthropic.Anthropic() with no key argument, because it reads ANTHROPIC_API_KEY.

Where do you find your Claude API key?

Claude API keys (Anthropic’s docs say they are “also called Anthropic API keys”) all live on one page: API keys in the Claude Console, at platform.claude.com/settings/keys (Get your Claude API key).

  • You can see that a key exists, but not the full key. The Console shows the full key only once, at creation. If you lose it, you can’t view it again; create a new key instead and revoke the old one.
  • Create key is greyed out? Your role may not allow key creation. Ask an organization admin to change your role or to create a service account key for you.
  • Personal or service account key? A personal key acts as you and stops working if you leave the organization. Anthropic recommends a service account key for anything shared, such as CI pipelines or production services.

Should you use workspaces?

Yes, once you have more than one project. The Console lets you split keys into workspaces to “separate environments and control spend by use case.” If a key covers several workspaces, every request must include an anthropic-workspace-id header, or it can fail. Single-workspace keys run in their own workspace automatically.

Can you get a Claude API key for free?

Partly. The key is free, a small trial credit is included, and after that you pay per token. Two other legit routes:

  • Claude Max or Team: these now include monthly API credits, with more on higher tiers (claude.com/pricing). See Claude Pro vs Max vs API.
  • Claude Startups program: expanded on October 6 with “a year of Claude Team, API credits” and more (@claudeai). Three days later, Anthropic said it had “underestimated demand” and paused its Claude Team and API credit offers while it re-reviews applications (@claudeai).

Avoid “free Claude keys” posted online. A key is tied to its owner’s billing account; leaked keys get revoked, and using them may break Anthropic’s terms.

What if the key doesn’t work?

  • 401 authentication_error: re-copy the key, check it hasn’t expired, and add anthropic-workspace-id for multi-workspace keys.
  • 400 after setup: your spend limit may be reached; check Billing.
  • 429 or 529: see how to fix API errors.

Next, estimate costs with Claude API pricing, or browse the Claude hub.

FAQ

Is a Claude API key the same as an Anthropic API key?

Yes. Anthropic's docs say API keys for the Claude API are also called Anthropic API keys. Both names refer to the same key, created in the Claude Console.

Where do I find my existing Claude API key?

The Console lists your keys on the API keys page (platform.claude.com/settings/keys), but it shows the full key only once, at creation. If you lost it, create a new key and revoke the old one.

Is the Claude API key free?

Creating a key is free, but usage is billed per token. Anthropic says new users get a small amount of free credit to test the API. Claude Max and Team subscriptions now include monthly API credits.

Where do I create a Claude API key?

In the Claude Console, on the API keys page at platform.claude.com/settings/keys. You choose the key type and expiration when you create it.

Can I use my Claude Pro subscription as an API key?

No. Claude.ai subscriptions and the API are separate. Pro includes no API credits; Max and Team include monthly API credits that apply to API usage from a Console key.

Why does my new Claude key return 401?

Usually the key was pasted with extra characters, has expired or been revoked, or is a multi-workspace key sent without the anthropic-workspace-id header.

What happened to the Claude Startups API credit offer?

Anthropic paused the Claude Team and API credit offers on October 9, 2026 after demand outstripped supply, and said it was re-reviewing applications.

Sources

  1. Claude docs: Get your Claude API key (accessed 2026-11-02)
  2. Anthropic: API overview (Getting API keys) (accessed 2026-11-02)
  3. Anthropic: Get started (accessed 2026-11-02)
  4. Anthropic: Pricing (Claude API docs) (accessed 2026-10-17)
  5. X: @claudeai pausing Startups Team and API credit offers (Oct 9, 2026) (accessed 2026-10-18)
  6. X: @claudeai expanding the Claude Startups program (Oct 6, 2026) (accessed 2026-10-18)

Independent guide. Some links may be affiliate or partner links; they never change what we write. See our disclosure. Found an outdated price? Tell us.