How to Get a Claude API Key in 2026: Console, Billing and First Call

Updated · By topai.one editorial team

Quick answer: Sign up for the Claude Console at platform.claude.com, add credits on the Billing page, then create a key on the API keys page (platform.claude.com/settings/keys). Store it as ANTHROPIC_API_KEY and test it with one request to https://api.anthropic.com/v1/messages. The whole process takes about five minutes.

What do you need before you start?

Anthropic’s API overview 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. Create a Console account at platform.claude.com.
  2. Add credits: open the Billing page (platform.claude.com/settings/billing). New users get “a small amount of free credits to test the API”, per Anthropic’s pricing docs.
  3. Create the key on the API keys page (platform.claude.com/settings/keys). Anthropic says you “choose each key’s type… and its expiration when you create it.”
  4. Copy it once and store it as an environment variable:
export ANTHROPIC_API_KEY="sk-ant-..."
  1. Test it:
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-haiku-5-5","max_tokens":100,
       "messages":[{"role":"user","content":"Say hi"}]}'

Anthropic’s own quickstart uses claude-opus-5-5. We use Haiku 5.5 for the test because it is the cheapest current model.

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 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. Anthropic: API overview (Getting API keys) (accessed 2026-10-18)
  2. Anthropic: Get started (accessed 2026-10-18)
  3. Anthropic: Pricing (Claude API docs) (accessed 2026-10-17)
  4. X: @claudeai pausing Startups Team and API credit offers (Oct 9, 2026) (accessed 2026-10-18)
  5. 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.