A longer version of this guide is on our site, tripwire.deadlinkpatrol.com. Facts checked November 17, 2026.
From Swift Labs. Written with AI help and checked against Anthropic's public docs on November 17, 2026. Swift Labs isn't affiliated with Anthropic. This is general information, not security or legal advice.
If someone else has your Claude API key, they can run up charges on your account. Anthropic's help center compares an API key to a credit card number: if someone gets it and uses it, "they incur charges on your behalf." Work through these five steps in order. Each one uses the page and button names from Anthropic's docs. We have not walked through the Console in a live account; if a label has changed, trust what you see in the Console.
The short version
- Disable or delete the key on the API keys page in the Claude Console.
- Check the Usage, Cost and Logs pages to see how much was used and when.
- Set or lower your monthly spend limit.
- Put a new key everywhere the old one was used, and find out how it leaked.
- Contact Anthropic support with the key name, the time window and what you found. Never send the key itself.
1. Disable or delete the key
Sign in to the Claude Console and open the API keys page (platform.claude.com/settings/keys). Anthropic's advice for a key you think is compromised is to revoke it right away: click the menu (the three dots) next to the key and select Delete API key.
You have two options, and Anthropic lists both for a key you suspect has leaked:
- Disable can be undone. The key can be re-enabled later.
- Delete is permanent. The key is archived and can't be used again.
If you're not sure which key leaked, disable every key that could be it, then delete the leaked one once you know. Any app still using that key will stop working until you give it a new key in step 4.
If the leaked key starts with sk-ant-admin, it's an Admin API key, not a regular API key. Admin keys live on a separate Admin keys page (platform.claude.com/settings/admin-keys). They have no scopes: Anthropic says "every key has full access to the endpoints that accept it," and the Admin API can manage organization members, workspaces and API keys. Remove that key too, then check your members, workspaces and API keys for changes you didn't make.
If the key was in a public GitHub repository, Anthropic may already have acted. Anthropic is a GitHub secret scanning partner: GitHub scans public repositories for Claude API keys and notifies Anthropic, which "automatically deactivates the exposed API key" and emails the affected user. That covers public GitHub repositories only. A key that leaked anywhere else won't be caught this way, and even after that email you still need the rest of this list.
2. Check Usage and Cost to see what happened
In the Claude Console, look at:
- the Usage page (
platform.claude.com/usage), - the Cost page (
platform.claude.com/cost), - the Logs page (
platform.claude.com/logs).
Anthropic recommends reviewing the Logs and Usage pages for your API keys. Write down, in UTC:
- when the unusual use started and stopped,
- which models were used, especially ones you don't use,
- roughly how many tokens and dollars it added up to,
- which workspace it was in.
You'll want these notes for step 5.
For a per-key breakdown, Anthropic's Usage and Cost API can group usage by API key and model. It needs an Admin API key, or a personal or service account key that isn't scoped to a workspace; workspace keys don't work, and individual Console accounts without an organization can't use it. If you create an Admin key just for this, pick a short expiration such as 3 hours and delete it when you're done, because every Admin key has full access. There's a worked curl example in the longer guide.
3. Set or lower your spend limit
A spend limit caps what anyone, including someone with a key you haven't found yet, can spend in a month.
Open Spend limits in the Claude Console (platform.claude.com/settings/spend-limits). Next to your organization's Monthly spend limit, click Adjust limit or Set limit. Enter a new value. It can't be higher than your usage tier's cap.
If you don't see Spend limits, an older help-center article points organizations with custom rate limits to the Billing page instead (platform.claude.com/settings/billing).
When usage reaches a limit you set, API requests fail with an HTTP 400 error until access resumes or you raise the limit. That includes your own apps, so pick a number you can live with. (If you hit the tier's own monthly cap rather than a limit you set, requests return HTTP 429 until the next month or a tier change.)
Each usage tier also has its own monthly spend cap: $500 for Start, $1,000 for Build and $200,000 for Scale. Custom-tier organizations have no monthly cap. You can also set spend and rate limits for each workspace, except the default workspace, which can't have its own spend limit. Organization-wide limits always apply.
If your account tops up prepaid credits automatically, look at auto-reload on the Billing page. Anthropic says auto-reload limits also act "as a safeguard against unexpected high usage that could result from leaked keys." Until you've found the leak, consider lowering the auto-reload amount so a stolen key can't keep topping up your credits.
4. Rotate keys everywhere and find the leak
On the API keys page, click Create key, name it and pick an expiration. You can't change the expiration later. For a production service, Anthropic suggests a service account key rather than a personal one, so the key doesn't act as one person.
Put the new key everywhere the old one was. That's usually the ANTHROPIC_API_KEY environment variable or a secrets manager entry. Confirm requests succeed, then delete the old key. If you only disabled the leaked key in step 1, delete it now. Store the new key in a secrets manager, not in your code or version control.
Rotate whatever sat next to it. If the key leaked from a .env file, a CI system or a shared tool, other secrets in the same place were probably exposed too.
Common places to check:
-
Public deploys. A
.envor Wrangler.dev.varsfile in a project root can end up downloadable if a deploy uploaded the whole directory as a public site. Look at the live site, not only the repo. - Git history. Deleting the key in a new commit doesn't remove it from earlier ones.
- Hosted environment variables and secret stores for Pages, Workers, CI and the host your app runs on.
- Front-end code. A key in JavaScript that runs in the browser can be read by anyone who loads the page.
- CI and app logs, error trackers and debug output.
- Third-party tools. Anthropic notes that putting your key into a third-party tool gives that tool's developer access to your Console account.
- Chats, tickets and email. Anthropic says not to share keys in emails or support tickets, even with Anthropic.
Anthropic also recommends turning on secret scanning in your source control provider, and using a tool such as Gitleaks in CI before code reaches your main branch.
5. Contact Anthropic support
Anthropic's compromised-key article says to contact support if you keep seeing suspicious activity or have other concerns. To reach support for the Claude API or Console:
- Sign in to the Claude Console.
- Click your initials or name in the lower left corner and select Get help.
- In the support messenger, click Send us a message. You'll chat with Fin, Anthropic's AI support bot, first. If your issue needs more investigation, Fin passes it to the Product Support team, and their reply comes in the same conversation and by email.
Console Admins can reach the human support team. If you're not an admin, an Owner or Console Admin in your organization has to escalate for you. Support is in writing only, and Anthropic asks for one conversation per issue.
What to include:
- your organization name and the name of the leaked key (never the key itself),
- when you disabled or deleted it,
- the time window of the unusual use, in UTC,
- the models, token counts and costs you found in step 2,
- how the key leaked, if you know.
About the charges: Anthropic's Commercial Terms say the customer "is responsible for all activity under its account" and "will promptly notify Anthropic" if it believes its account has been compromised. We couldn't find a published Anthropic policy on refunds for usage from stolen keys. Ask, but whether any charges are adjusted is Anthropic's decision.
After the first hour
Keep watching usage for the next few days, in case another key or credential was exposed in the same leak. Give new keys an expiration date, so a leaked key stops working on its own. Use separate keys for development, testing and production. Keep few Admin keys: only members with the admin role can create them, and each one has full access.
Set up an alert for unusual usage. Anthropic lists partner integrations, including Datadog, Grafana Cloud and Vantage, on its Usage and Cost API page.
Sources
Checked November 17, 2026.
- Anthropic: Authentication (key types, disable vs. delete, expiration, rotation)
- Anthropic: Rate limits (spend limits, tier caps, workspace limits)
- Anthropic: Usage and Cost API
- Anthropic: Admin API keys
- Claude Help Center: What should I do if I suspect my API key has been compromised?
- Claude Help Center: API key best practices
- Claude Help Center: How to get support
- Anthropic: Commercial Terms of Service
Swift Labs. Not affiliated with Anthropic.
Top comments (0)