Redact personal data from text
Detects personal data (emails, phone numbers, card and IBAN numbers with checksum validation, API keys and other secrets, and more) and returns the text with each span replaced by its entity label, plus the findings with byte offsets. Up to 1 MiB of text. Metered as pii.redact.
POST
/v1/pii/redactAuthorization
AuthorizationBearer token (JWT) · headerrequiredBearer API key issued for your account. Send Authorization: Bearer <key>.
Request body
requiredapplication/jsontextstringrequiredUp to 1 MiB.
Responses
200
Redacted text and findings
redacted_textstringrequiredfindingsPiiFinding[]requiredShow propertiesHide properties
Array of
PiiFindingentity_typestringrequiredstartintegerrequiredByte offset of the first byte of the span.
endintegerrequiredByte offset one past the last byte.
scorenumberrequired0 to 1.
400
Bad request
string401
Missing or invalid bearer token
string403
Billing or plan entitlement blocked the request
string502
Upstream service (arXiv, YouTube, web page) failed
string503
The backing service is not configured or is busy
string