text_pii_mask
PII and secret masking (deterministic) — Find and mask personal data and secrets in text before you log it, store it or send it to an LLM. Offline, no AI, nothing stored. Detects email, phone (US and international +), US SSN (SSA validity rules, or 9 digits after an SSN label), credit cards (Luhn + brand), IBAN (mod-97), IPv4/IPv6, MAC, labelled date of birth, US street addresses (heuristic), EIN, passwords in URLs, API keys (AWS, GitHub, Stripe, Slack, Google, OpenAI, Anthropic, GitLab, SendGrid, Twilio, npm, Hugging Face), JWTs and PEM private keys. text= (up to 100,000 chars), style=label (default, [EMAIL]) | numbered ([EMAIL_1], same value keeps the same number) | partial (a***@e***.com, ****-1111) | remove | hash (salted SHA-256 prefix, salt=), types= or exclude= comma lists, allow= values to leave untouched, return_map=true returns placeholder to original map so you can restore values after an LLM call. Returns masked text, per-type counts, findings with offsets, confidence and a preview, and a risk level NONE/LOW/MEDIUM/HIGH. Names are not detected: use /v1/ai/pii-redact for those. Price: $0.002 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>",
"style": "<style>"
},
"name": "text_pii_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Contact Ada at ada@example.com or (415) 555-0132, card 4111 1111 1111 1111, SSN 123-45-6789. | |
| style | Yes | numbered |