---
id: "openai_api_key"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 63
url: "http://registry.apicrafter.io/datatype/openai_api_key"
---

# OpenAI API key (`openai_api_key`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Secret key of the OpenAI API. Keys start with sk-; project, service account and admin keys start with sk-proj-, sk-svcacct- or sk-admin-. Secret scanners recognise them by the fixed marker T3BlbkFJ in the middle of the key. Examples are left out because GitHub push protection rejects token-shaped values, even constructed ones.

- Parent datatype: `api_key`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:sk-(?:proj|svcacct|admin)-(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})T3BlbkFJ(?:[A-Za-z0-9_-]{74}|[A-Za-z0-9_-]{58})|sk-[A-Za-z0-9]{20}T3BlbkFJ[A-Za-z0-9]{20})$
```

## Examples

- `sk-ExampleKeyNotReal000ExampleKeyNotReal000` (invalid example) — The T3BlbkFJ marker is missing

## Supported by tools

- `detectsecrets`
- `gitleaks`
- `semgrep`
- `trufflehog`

## Sources

- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

Score 63/100. Missing: examples, authoritative source link, mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/openai_api_key.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/openai_api_key.yaml>
