{"uid":"cap_rKpgZxQ_IEci06AJQ6omm","slug":"payai-pii-redaction-tokenization-a21c4641","name":"PayAI PII Redaction & Tokenization","description":"Detect and transform structured PII in a text blob. Returns the sanitized text plus a findings report. Modes: redact, mask, hash, or reversible tokenize (the token map is returned in the response — nothing is stored). Optional per-type mode overrides and an allow-list. Structured PII indicators, not legal advice.","url":"https://payai.agentstools.dev/pii/redact","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mode":{"enum":["redact","mask","hash","tokenize"],"type":"string","description":"Default transform applied to every entity"},"salt":{"type":"string","description":"Optional salt mixed into hash mode"},"text":{"type":"string","description":"The text to sanitize"},"entities":{"type":"array","items":{"type":"string"},"description":"Optional allow-list of entity types to act on (default: all). See GET /pii/recognizers."},"mode_overrides":{"type":"object","description":"Optional per-entity-type transform, keyed by type"},"include_positions":{"type":"boolean","description":"Include character start/end offsets per finding"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xs65SQuDPUUdE-r2lyoKT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects structured PII in a text blob and transforms it via redact, mask, hash, or reversible tokenize modes, returning sanitized text plus a findings report.","exampleAgentPrompt":"Scan this customer support message for any PII — names, emails, phone numbers, SSNs — and return a sanitized version using reversible tokenization so I can recover the originals later: 'Hi, I'm John Smith, my email is john@example.com and my SSN is 123-45-6789, please help me reset my account.'","exampleUseCases":[{"title":"Sanitize support tickets before logging","prompt":"Before we write this support ticket to our database, scrub all PII from the message body using redact mode — here's the text: 'Customer Jane Doe, DOB 1985-03-12, card ending 4242, called about a billing issue.'"},{"title":"Reversible anonymization for AI training data","prompt":"I need to de-identify this batch of user feedback text for our ML team — use reversible tokenization so we can map back to real values later if needed: 'Alice Wang (alice.wang@corp.com, +1-415-555-0199) reported the bug on March 3rd.'"},{"title":"GDPR compliance check on outbound email draft","prompt":"Check this draft email for any personal data before it goes out, and mask anything sensitive — replace values with asterisks but tell me what PII types were found: 'Dear Mr. Carlos Ruiz, your order #8821 ships to 22 Oak Street, Austin TX 78701.'"}],"resultDescription":"Returns a JSON object containing: (1) the sanitized version of the input text with PII transformed according to the chosen mode, (2) a findings report listing each detected PII item including its type, original span, position, and replacement value, and (3) a token map (when tokenize mode is used) mapping generated tokens back to the original values — nothing is stored server-side.","failureModes":["Unstructured or ambiguous PII (e.g. colloquial names without context) may not be detected","Non-English text may have lower detection accuracy","Malformed input JSON returns a 400 error","Unknown mode values return a validation error","Very large text blobs may hit payload size limits","Results represent structured indicators only, not legal compliance guarantees"],"whenToPreferThis":"Choose this endpoint when you need stateless, per-call PII transformation with flexible output modes (redact, mask, hash, or reversible tokenize) and a detailed findings report — especially when you want the token map returned in-response rather than stored. Prefer it over regex-based approaches when you need multi-type PII detection in a single pass with optional per-type mode overrides and an allow-list.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:10:43.957Z","isFirstParty":false}