Skip to main content
POST
text.redact

Authorizations

Authorization
string
header
required

API key: sk_live_…

Headers

Idempotency-Key
string

Optional. A retry with the same key returns the stored result.

Maximum string length: 255
Pramaan-Max-Price-Micro
string

Optional. The most this request may be priced at, in micro-USD (a whole number above 0). It replaces the capability's own price ceiling for this request, lower or higher. Sources that could cost more are left out; when none is left the answer is 400 with the lowest limit that would work.

Pattern: ^[1-9]\d{0,14}$

Body

application/json
text
string
required

Text to redact, up to 50000 characters. It is not stored.

Maximum string length: 50000
entities
enum<string>[]

Kinds of personal data to redact: person names, email addresses, phone numbers, locations and addresses, financial numbers (cards, accounts), and secrets (keys, passwords). Default: all.

Required array length: 1 - 6 elements
Available options:
person,
email,
phone,
location,
financial,
secret
style
enum<string>
default:tag

tag replaces each span with a placeholder such as ; mask replaces its characters with *; remove deletes it. Default tag.

Available options:
tag,
mask,
remove
mode
enum<string>
default:accurate

accurate favours precision; thorough also redacts likely matches; fast uses pattern rules only. Default accurate.

Available options:
accurate,
thorough,
fast

Response

The result

text
string
required

The text with the chosen kinds of personal data redacted.

redacted
object[]

Which kinds of personal data were redacted and how many of each, where the source reports it; absent otherwise, never estimated.

Maximum array length: 6