Anthropic API Key
Detects Anthropic (Claude) API keys. Standard keys use the sk-ant-api03- prefix followed by a long base64url body ending in AA; admin keys use sk-ant-admin01-. A leaked key grants billed access to the Anthropic API and any connected data.
- Type
- regex
- Engine
- universal
- Confidence
- high
- Confidence justification
- High confidence: the distinctive sk-ant-api03-/sk-ant-admin01- prefix, fixed body length and trailing AA make false positives extremely unlikely.
- Jurisdictions
- global
- Regulations
- Criminal Code Act 1995 (Cth)
- Frameworks
- CIS Controls, ISO 27001, NIST CSF, SOC 2
- Data categories
- credentials, security
- Scope
- narrow
- Risk rating
- 9
- Platform compatibility
- Purview: Compatible, GCP DLP: Unsupported, Macie: Unsupported, Zscaler: Compatible, Palo Alto: Unsupported, Netskope: Unsupported
Pattern
(?<![A-Za-z0-9])sk-ant-(?:api03|admin01)-[A-Za-z0-9_-]{93}AA(?![A-Za-z0-9])
Corroborative evidence keywords
anthropic, claude, api key, api_key, ANTHROPIC_API_KEY, bearer token, x-api-key
Proximity: 300 characters
Should match
sk-ant-api03-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdeAA— Standard Anthropic API key, sk-ant-api03- prefix + 93 chars + AAANTHROPIC_API_KEY=sk-ant-api03-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdeAA— Labelled Anthropic key in an env assignmentsk-ant-admin01-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdeAA— Anthropic admin API key, sk-ant-admin01- prefix
Should not match
sk-ant-api03-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghij— Too short to be a valid Anthropic key bodysk-ant-api02-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_ABCDEFGHIJKLMNOPQRSTUVWXYZ12AA— Wrong version marker (api02 instead of api03/admin01)please rotate the anthropic claude api key before release— Prose mention without a token value
Known false positives
- Documentation or examples showing placeholder sk-ant- strings. Mitigation: Require corroborative keywords and check for placeholder markers (example, xxxx).