Claude API Key (Anthropic): How to Get One and Keep It Safe
You create a Claude API key, also called an Anthropic API key, in the Claude Console: sign in, open Settings, then API keys, and click "Create key".
The API is billed separately from a Claude subscription, so set up billing in the Console before you use it.
Steps checked against Claude's own docs in Nov 2026. Menus change, so if a screen looks different, follow the linked docs.
How to get a Claude API key
- Sign in to the Claude Console (the developer console, separate from the Claude chat app).
- Open Settings, then API keys.
- Click "Create key" and give it a name that says where it'll be used.
- Copy the key and keep it somewhere safe.
- Save it as an environment variable called
ANTHROPIC_API_KEY. Anthropic's Claude SDKs read it from there.
Anthropic says a paid Claude subscription and the API are billed separately, although its Max, Ultra (formerly Max 20x) and Team plans include monthly API credits (Anthropic help).
Check a key you already have
Not sure which service a key in your config belongs to, or whether you just pasted one somewhere? Paste it below to see what it is and how to revoke it.
Runs only in your browser. The check happens on this page. What you paste isn't sent anywhere, saved or logged, and the checker never contacts the provider. Want proof? Open your browser's network tab, or turn off Wi-Fi, and paste.
What a Claude API key looks like
Claude API keys start with sk-ant-api03-, and Admin API keys with sk-ant-admin01-. Both are followed by 93 letters, digits, dashes or underscores and end in AA, which is the shape the gitleaks rule set looks for.
How to store your Claude API key safely
- Keep it in
ANTHROPIC_API_KEYor a secret manager, never in your code. - Use a separate key per app and environment, and organize them in Console workspaces so one leak doesn't take everything down.
- Rotate keys on a schedule. Anthropic (Claude) suggests, for example, every 90 days: create a new key, then deactivate the old one.
- Never commit it to a public repo. GitHub scans public repositories for Claude API keys, and Anthropic automatically deactivates any it finds and emails you, which will break whatever was using it.
Never paste your Claude API key into an AI chat
It usually happens while debugging. The error sits next to a config file, you paste the whole thing into ChatGPT or Claude, and the key goes in with everything else.
Once it's sent, the key is stored on someone else's servers, in the chat history, and possibly in training data, depending on your account settings. Deleting the chat doesn't take it back, so treat any key you pasted as exposed and rotate it.
We wrote a step-by-step guide for that moment: what to do in the first hour after pasting an API key into ChatGPT. And if a tool you installed might have read your keys, see how to check whether your AI keys were exposed.
What to do if your Claude API key leaks
Rotate first and investigate second. A key that no longer works can't be misused.
- Open API keys in the Claude Console.
- Click the three-dot menu next to the exposed key and choose "Delete API key".
- Click "Create key", update your apps, then check usage in the Console for requests you didn't make.
How Sequirly catches keys at the paste
We build Sequirly, a browser extension that checks what you're about to send to ChatGPT, Claude, Gemini and other AI tools. When a prompt contains an API key, a password or other sensitive data, Sequirly warns you before it leaves your browser, so you can remove it and send the rest.
The check runs inside your browser, and Sequirly says it never sees, stores or sends the values it finds.
There's plenty it doesn't do, so you know where the gaps are:
- It doesn't scan your code, repos or servers. Use a secret scanner such as gitleaks for that.
- It doesn't revoke keys or check whether a key is live. Rotation is still on you.
- It only knows keys by their shape, so a key with no prefix (like Mistral's) can slip past it, just as it slips past the checker above.
- It warns before it blocks, so a person can still choose to send.
Curious how to test that claim yourself? Our post on whether Sequirly is safe to install walks through a network test you can run.
Common Questions
Is the Claude API key the same as an Anthropic API key?
Yes. Anthropic makes Claude, and the key you create in the Claude Console is the Anthropic API key for Claude models.
Does Claude Pro include API access?
Anthropic says a paid Claude subscription and the Claude API are billed separately. Its Max, Ultra and Team plans include monthly credits for the Claude API.
Where do I find my Anthropic (Claude) API key?
Your keys are listed in the Claude Console under Settings, then API keys (platform.claude.com/settings/keys), where you can also create and delete them.
What happens if my Claude API key ends up on GitHub?
GitHub scans public repositories for Claude API keys. Anthropic automatically deactivates an exposed key and emails you, so create a new one and update your apps.
What does a Claude API key look like?
A Claude API key starts with sk-ant-api03- and ends in AA. Admin keys start with sk-ant-admin01-.
Sources
- Claude docs: Get started (checked Nov 2026)
- Anthropic (Claude) help: API key best practices (checked Nov 2026)
- Anthropic (Claude) help: If your API key has been compromised (checked Nov 2026)
- Anthropic (Claude) help: Paid Claude plans and the API (checked Nov 2026)
- gitleaks rule set (anthropic-api-key) (checked Nov 2026)
Guides for other API keys
Catch the key before it leaves
If you'd like a warning the next time a key ends up in a prompt, try Sequirly now. Or if you'd rather talk it through with us first, book a quick demo.