Detect and redact PII in a block of text.
If PII_SVC_TOKEN is set on the server, this endpoint requires
Authorization: Bearer <token>. Otherwise it is open.
/redactOptional — this operation also accepts unauthenticated requests.
AuthorizationBearer token (opaque) · headerOpaque token compared in constant time against PII_SVC_TOKEN. Only
required when the server has the env var set.
application/jsontextstringrequiredThe text to scan and redact.
Redaction succeeded.
redacted_textstringrequiredInput with every detected span replaced by [ENTITY_TYPE].
findingsFinding[]requiredOne entry per detected span, sorted by start, non-overlapping
(overlap resolution: longer span wins).
Show propertiesHide properties
Findingentity_typestringrequiredLabel of the detected entity. Stable identifiers from the
deterministic passes — EMAIL_ADDRESS, IP_ADDRESS (IPv4/IPv6),
PHONE_NUMBER, CREDIT_CARD, the Australian IDs AU_TFN /
AU_ABN / AU_MEDICARE, the international IDs from pii-core::intl
(US_SSN, IBAN, UK_NHS, FR_NIR, DE_STEUER_ID, IN_AADHAAR,
JP_MYNUMBER, … see crates/pii-core/src/intl.rs for the full set),
the credential labels PRIVATE_KEY / API_KEY / JWT / SECRET,
and the identity labels PERSON / USERNAME / HOST — or any
label emitted by the GLiNER-PII model.
startintegerrequiredByte offset (inclusive) into the request text.
endintegerrequiredByte offset (exclusive) into the request text.
scorenumber<float>required1.0 for checksum/regex/secret/identity hits; 0.9 for IPs and
shape-only IDs; ≈0.6 for NER hits.
Body was not the expected { "text": "..." } JSON shape.
stringBearer auth required but missing or wrong.
string