# How to get a Claude API key

Sign in at platform.claude.com, open Settings > API keys and click Create key. Plus: credits, where to paste the key, and how to keep it safe.

Tool: Claude. By Julien Lieben. Updated 2026-11-23. Source: https://coldiq.com/university/claude/claude-api-key

## In short

- A Claude API key is a secret code that lets a program use Claude. You create it in the Claude Console at platform.claude.com/settings/keys.
- The key starts with sk-ant- and is shown only once. If you lose it, you cannot see it again; you create a new one.
- API usage is billed apart from a Claude Pro, Max or Team subscription. You pay with prepaid credits on the Console’s Billing page.
- Max, Ultra and Team plans include monthly API credits that you can link to a Console organization. Pro does not.
- Never paste a key into a shared document, a chat or a public code repository.

## Steps

1. Sign in to the Claude Console at platform.claude.com.
2. Open the API keys page and click Create key.
3. Copy the key once, store it in a safe place, and add credits.

## What is a Claude API key?

The API (application programming interface) is how software talks to Claude without the chat window. An API key is the password that proves the request comes from your account.

You need one when a tool asks for "your Anthropic API key", when you build a small script or an agent, or when you use the Claude Agent SDK.

You do not need one to chat on claude.ai. You also do not need one to use Claude Code with a paid plan, since you sign in with your account there.


## How do you create a Claude API key?

Keys live in the Claude Console, Anthropic’s platform for developers. It uses its own account, separate from your chat subscription.

1. Go to platform.claude.com and sign in, or create an account.
2. Open the API keys page: platform.claude.com/settings/keys.
3. Click Create key and give the key a name you will recognize, such as "lead-scoring-script".
4. Pick an expiration date, and set Linked account to yourself (a personal key) or to a service account (a key for a shared tool).
5. Copy the key. It starts with sk-ant- and the Console shows it only once.
6. Store it in a password manager or a secrets manager right away.

Tip: If the Create key button is greyed out, your role in the organization does not allow it. Ask an admin to change your role or to create a service account key for you.


## Do you have to pay to use a Claude API key?

Yes, after a small start. Anthropic says new users receive free credits to test the API. After that, API usage is billed through prepaid credits that you buy on the Console’s Billing page (platform.claude.com/settings/billing).

A Claude Pro subscription does not include API usage. The chat plans and the Console are separate products.

Max ($100 in credits a month), Ultra ($200) and Team (pooled, up to $500) now include monthly API credits. To use them, go to Settings > Billing on claude.ai and click Link organization. New subscribers can claim them only after seven days on the plan. Unused credits expire at the end of each billing cycle.


## Where do you paste your API key?

Most tools have a settings field called "Anthropic API key" or "Claude API key". Paste it there and save.

For your own scripts, the standard is an environment variable (a setting your computer passes to programs) named ANTHROPIC_API_KEY. The official SDKs read it on their own. On Mac and Linux, run the command at the top of this page in your terminal. On Windows, use the PowerShell version.

Tip: Claude Code also reads ANTHROPIC_API_KEY. If it is set and you approve it, Claude Code bills that key instead of your plan. Remove it if you meant to use your subscription.


## Which key type should you choose?

A personal key acts as you. It stops working if you leave the organization. Use it for your own tests.

A service account key belongs to a service account, not a person. Use it for anything shared: a team tool, an automation, a production app. It keeps working when people come and go, and it stops when the service account is removed.

You can also scope a key to a workspace (a group of keys and limits inside your organization), so one project cannot spend another project’s budget.


## How do you keep your API key safe?

Anyone with your key can spend your credits. Treat it like a bank card number.

- Never paste it in a chat, a shared doc, a screenshot or a public GitHub repository.
- Keep it in a password manager, or in a .env file that is never committed to git.
- Use a different key for each tool, so you can stop one without breaking the others.
- Set an expiration date when you create the key.
- If a key may have leaked, disable or delete it on the API keys page of the Console at once, then create a new one. A key you only stop using still works for anyone who has it.


## Command

```
export ANTHROPIC_API_KEY="sk-ant-..."
```

## Sources

- [Get your Claude API key](https://platform.claude.com/docs/en/get-api-key)
- [Get started with Claude](https://platform.claude.com/docs/en/get-started)
- [Claude API pricing](https://platform.claude.com/docs/en/about-claude/pricing)
- [Why is Claude API usage billed separately from my paid Claude plan?](https://support.claude.com/en/articles/9876003-i-have-a-paid-claude-subscription-pro-max-team-or-enterprise-plans-why-do-i-have-to-pay-separately-to-use-the-claude-api-and-console)
- [Monthly API credits for Max, Ultra, and Team plans](https://support.claude.com/en/articles/17154008-monthly-api-credits-for-max-ultra-and-team-plans)

## Questions

**Is the Claude API key free?** Creating a key is free, and new users get free credits to test. After that you pay per use with prepaid credits.

**Can I see my Claude API key again?** No. The Console shows the full key only once. If you lose it, create a new key.

**Does Claude Pro include API access?** No. Pro covers the Claude apps only. Max, Ultra and Team include monthly API credits.

**Is an Anthropic API key the same as a Claude API key?** Yes. Anthropic’s docs use both names for the same key, created in the Claude Console.


## Try ColdIQ free

ColdIQ gives new accounts up to 1,450 free credits as they get started, no credit card required.
One subscription covers 40+ B2B data providers for finding, enriching and verifying
contacts and companies, through the web app, the API or the MCP server for AI agents.

1. Create an account: https://coldiq.com/marketplace/sign-up?utm_source=ai-assistant&utm_medium=markdown&utm_content=university
2. Run a first search on your own market with the free credits.
3. Connect the MCP server to Claude, ChatGPT or Cursor: https://coldiq.com/mcp
