Identity, redaction and leads logo

Selective PII redaction with a self-check

$0.05 USDC per call · Business, finance and compliance · POST /api/v1/redact-text · Id redact-text

Redacts personal data from text at the level you choose and proves the output is clean by scanning it again. Pick a level: 1 government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver's license, passport), 2 adds dates of birth, 3 adds street addresses and phone numbers, 4 adds person names and email addresses. Then switch single categories on or off with include and exclude, or name the exact set with categories; extras are credit cards, IBANs, routing and account numbers, IP addresses, URLs, every date, and organizations. minDigitRun redacts any run of that many digits, terms redacts words you list (business names, project names), and keep protects strings such as your own email address. Detectors use checksums and structure rules (Luhn, ABA, mod-97, SSN and EIN rules) so ordinary numbers are not swallowed, and every later mention of a redacted value is redacted too. Replacements are labels like [REDACTED:SSN], one generic marker, numbered tokens like [PERSON_2] that stay consistent, or labels that keep the last four characters. The response lists category, position and confidence for each redaction and never repeats the original values. The engine rescans its own output and returns an error (payment released) rather than a result that still contains a detected value. Names and organizations are heuristic; set useModel to add a model pass for names, organizations and addresses, which sends the text to the configured language-model provider. Text only, up to 1,000,000 characters (the request body may be up to 4 MB of UTF-8); nothing is stored and no digest of the input is returned.

What you get

Sending a contract, medical note or support log to a model, a vendor or a court filing without scrubbing it is a breach waiting to happen. This returns the scrubbed text, a count of what was removed by type, and a check that nothing detectable remains.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/redact-text. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/redact-text \
  -H 'content-type: application/json' \
  -d '{"text":"Patient: Maria Gonzalez, DOB 04/12/1980, SSN 123-45-6789. Reach her at maria.gonzalez@example.org or (555) 010-0199. Maria Gonzalez was seen at Acme Clinic, Inc.","level":4,"include":["organization"],"style":"label"}'

Input

FieldTypeRequiredDescription
textstring; length 1..1000000yesThe document text to redact (plain text, Markdown, CSV, JSON or HTML source).
levelinteger; 1..4noCumulative preset, default 1. 1: government identifiers (SSN, ITIN, EIN, UK NINO, Canadian SIN, driver's license, passport); 2: level 1 plus dates of birth; 3: level 2 plus street addresses and phone numbers; 4: level 3 plus person names and email addresses.
categoriesarray<string; one of "ssn", "itin", "ein", "nino", "sin", "drivers_license", "passport", "date_of_birth", "address", "phone", "person_name", "email", "credit_card", "iban", "routing_number", "account_number", "ip_address", "url", "date", "organization">; max 20 itemsnoExact set of categories to redact; replaces the level preset when given.
includearray<string; one of "ssn", "itin", "ein", "nino", "sin", "drivers_license", "passport", "date_of_birth", "address", "phone", "person_name", "email", "credit_card", "iban", "routing_number", "account_number", "ip_address", "url", "date", "organization">; max 20 itemsnoCategories to add to the level preset.
excludearray<string; one of "ssn", "itin", "ein", "nino", "sin", "drivers_license", "passport", "date_of_birth", "address", "phone", "person_name", "email", "credit_card", "iban", "routing_number", "account_number", "ip_address", "url", "date", "organization">; max 20 itemsnoCategories to remove from the level preset.
minDigitRuninteger; 4..40noAlso redact every run of at least this many digits (spaces, dots and hyphens between digits count as part of the run). This is the number of digits, not the numeric value.
termsarray<string; length 1..200>; max 200 itemsnoWords or phrases to redact wherever they appear (business names, project names, people you already know). Case-insensitive.
keeparray<string; length 1..200>; max 200 itemsnoStrings that must never be redacted, such as your own email address or company name. Case-insensitive, whole match.
stylestring; one of "label", "generic", "numbered", "last4"nolabel (default): [REDACTED:SSN]. generic: [REDACTED]. numbered: [PERSON_1], same value same number. last4: [REDACTED:SSN:*6789] for numeric identifiers; this discloses the last four characters.
useModelbooleannoAdd a language-model pass for names, organizations and addresses (when those categories are on). Sends the text, up to 60000 characters, to the configured model provider. Default false.

Example request body

{
  "text": "Patient: Maria Gonzalez, DOB 04/12/1980, SSN 123-45-6789. Reach her at maria.gonzalez@example.org or (555) 010-0199. Maria Gonzalez was seen at Acme Clinic, Inc.",
  "level": 4,
  "include": [
    "organization"
  ],
  "style": "label"
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
redactedTextstringno
statusstring; one of "complete"no
summaryobjectnototal redactions, byCategory counts and charactersRemoved.
redactionsarray<object>no
verificationobjectnopassed, residualDetections (rescan of the output), leakedValues (redacted values found again), distinctValues and outputSha256. No digest of the input is returned or signed, because a digest of guessable text would let a recipient recover what was redacted.
configobjectnoThe level, final category list, minDigitRun, style and useModel actually applied.
coveragearray<object>no
limitsarray<string>no
deterministicbooleannoTrue when no model was used.

Pay and connect

Available through: x402 (USDC on Base), MCP, RapidAPI, Apify.

Machine-readable