How to Find Your Anthropic API Key
If you're searching for how to find your Anthropic API key, the short answer is: it lives in the Anthropic Console, under Settings → API Keys, and it's only ever shown to you in full once — right after you create it. If you've lost the original value, you can't retrieve it again; you'll need to revoke it and generate a new one.
This guide walks through exactly where to look, what the key looks like, why it might seem "missing" even when it exists, and how to keep it safe once you have it.
Where the key actually lives
Anthropic's API keys are managed at console.anthropic.com, which is a separate product from the consumer Claude.ai chat interface. This distinction trips up a lot of people — logging into claude.ai does not give you an API key, because that's the chat product, not the developer platform.
To find your key:
- Log in at console.anthropic.com with the account tied to your organization.
- Open Settings in the left sidebar.
- Click API Keys.
- You'll see a list of keys by name, creation date, and status (active/revoked) — but the actual secret value is masked for existing keys.
If this is your first time here and the list is empty, you haven't generated a key yet — that's not a bug, it's expected. You need to click Create Key to generate one.
What an Anthropic API key looks like
Anthropic keys start with sk-ant- followed by a long alphanumeric string, for example:
sk-ant-api03-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
That prefix is a useful sanity check. If something you're pasting into an app doesn't start with sk-ant-, you're probably looking at the wrong credential — a session token, an org ID, or a workspace ID, none of which work as an API key.
Why you can only see it once
Anthropic shows the full key value exactly one time, immediately after creation, in a copy-to-clipboard dialog. After you close that dialog or navigate away, the console only ever displays a truncated version like sk-ant-...ab12. This is standard practice for API providers — it prevents the raw secret from sitting readable in a database that support staff or a compromised admin panel could expose.
Practically, this means:
- If you never copied it, it's gone. There's no "reveal" button.
- The fix is to revoke the old key and create a new one — there's no way to regenerate the same value.
- Store it immediately in a password manager or secrets vault the moment you create it, before you do anything else.
Checking you're in the right organization
Anthropic Console supports multiple organizations under one login (for example, if you're a member of more than one company's workspace). API keys are scoped to a specific organization, not to your personal account. If you know a key exists but can't see it:
- Check the organization switcher at the top of the console — you might be viewing the wrong org.
- Confirm you have the right role. Some organizations restrict key creation and visibility to admins; a member role might only see keys they personally created.
- Ask whoever administers billing for your org to check under their Settings → API Keys view.
Common reasons the key "doesn't work" once found
Finding the key is only half the problem — a surprising number of "invalid API key" errors are caused by something other than a wrong string:
- Extra whitespace or line breaks from copy-pasting into a
.envfile. - Using a revoked key. Keys can be deactivated by an admin without deleting them from the list.
- Missing billing setup. A key can exist and authenticate but still get rejected on requests if the organization has no valid payment method attached.
- Wrong header name. The Anthropic API expects the key in an
x-api-keyheader, notAuthorization: Bearer, which is a common mix-up for people used to OpenAI-style auth.
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-3-5-sonnet-20241022","max_tokens":100,"messages":[{"role":"user","content":"hi"}]}'
Keeping the key once you've found it
Once you have a working key, treat it like a password:
- Store it in environment variables, not hardcoded in source files.
- Add
.envto.gitignorebefore you ever commit. - Rotate it periodically, especially if it was ever pasted into a shared Slack channel or ticket.
- Use separate keys per environment (dev, staging, production) so you can revoke one without breaking the others.
If you're building a product on top of Claude and want a layer that manages keys, usage tracking, and team access without you having to build that tooling yourself, that's the gap SubToAPI fills — it turns your Claude access into scoped application keys (sub_live_...) with per-key usage metadata and team seats, sitting on top of the same underlying models. You can see how the request format compares in the quickstart docs.
Quick recap
- API keys live in Anthropic Console → Settings → API Keys, not on claude.ai.
- They start with
sk-ant-and are shown in full only once. - If you didn't save it, revoke and recreate — there's no recovery.
- Confirm you're checking the right organization if a key seems to have vanished.
- Auth uses the
x-api-keyheader, notAuthorization: Bearer.
questions
Can I see the full value of an Anthropic API key after I've already created it? No. Anthropic only displays the complete key once, at creation time. After that, the console shows a truncated version for identification purposes only. If you lost the value, revoke the key and create a new one.
Is my Anthropic API key the same as my Claude.ai login? No. Claude.ai is the consumer chat product; API keys are issued through the separate Anthropic Console for developers building on the API. Logging into Claude.ai will never show you an API key.
Why can't I find any API keys in my console even though my team has one? You're likely viewing the wrong organization, or your account role doesn't have permission to view keys created by an admin. Check the organization switcher and ask an org admin to confirm the key exists and share access if needed.