# My Anthropic (Claude) key leaked. What do I do?

**Short answer:** Disable the key in the Claude Console's API keys page right away (disabling is instant and reversible), create a replacement stored only on your server, review usage for calls you didn't make, then delete the old key. A leaked key lets anyone run Claude models billed to your organization.

*Last updated 2026-11-25 · Reviewed by ProofForge*

## Is it this key?

**Format:** `sk-ant-` (for example `sk-ant-api03-…`)

**Blast radius:** Anyone with the key can send requests billed to your organization and reach any workspace resources the key is scoped to.

## The first 10 minutes

| When | Do | How |
|---|---|---|
| 0–2 min | Disable | In the Claude Console → API keys, disable the leaked key. |
| 2–4 min | Replace | Create a new key and set `ANTHROPIC_API_KEY` on your server. Redeploy. |
| 4–7 min | Check usage | Review Usage and Cost for the key's workspace. Set spend limits. |
| 7–10 min | Close the hole | Remove the key from frontend code and git history, then delete the disabled key. |

## Stop the next leak

- Keep the key in a server-side env var. Never use a `VITE_`, `NEXT_PUBLIC_` or `EXPO_PUBLIC_` variable or hard-code it in frontend code.
- Call the provider from your backend or an edge function, and add `.env*` to `.gitignore`.
- Re-scan the live site after every deploy. Keys also leak through JS bundles, source maps and exposed `.env` or `.git` paths.

> **Scan box (use the site's ScanBox component):** Check whether your live app has this problem. Paste your URL for a free outside-in scan covering exposed keys, open database rules, CORS and security headers. [Scan my app free →](https://proofforge.live/#scan)

## FAQ

### Disable or delete?
Disable first because it's immediate and reversible. Delete once nothing depends on it.

### What error will old deployments show?
`401 authentication_error`. See /errors/anthropic-authentication-error.

### Can the Claude API be called safely from the browser?
Not with a standard API key. Proxy through your server.

## Sources

- [Anthropic: API key best practices](https://support.anthropic.com/en/articles/9767949-api-key-best-practices-keeping-your-keys-safe-and-secure)
- [Claude: Get an API key](https://platform.claude.com/docs/en/get-api-key)

## Related

- [Fix: Anthropic key exposed](/fix/anthropic-key-exposed)
- [Fix Anthropic 401 authentication_error 'invalid x-api-key'](/errors/anthropic-authentication-error)
- [Exposed API key checker](/tools/exposed-api-key-checker)
- [Fix: source maps exposed](/fix/source-maps-exposed)
- [All leaked-key guides](/leaked-keys)
