{"uid":"cap_rUo0_zakEi9dWP_tsePKh","slug":"pii-redaction-and-anonymization-74186c3d","name":"PII Redaction and Anonymization","description":"PII redaction for agent pipelines: remove personal data from text before it goes to another model, a log, a ticket system or a dataset. Emails, IBANs (checksum verified), card numbers (Luhn verified), phone numbers and IP addresses are found by exact patterns; names of people, street addresses, birth dates and ID numbers by Claude Haiku 5.5.","url":"https://agentsvc.io/api/v1/proxy/pii-redact?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"keep":{"type":"array","items":{"type":"string"},"description":"Values to leave in place, e.g. your own support address"},"mode":{"enum":["placeholder","mask","remove"],"type":"string","default":"placeholder","description":"placeholder: [EMAIL_1]; mask: ████; remove: delete"},"text":{"type":"string","description":"Text to redact, max 8,000 chars"},"types":{"type":"array","items":{"enum":["PERSON","EMAIL","PHONE","ADDRESS","IBAN","CARD","IP","DATE_OF_BIRTH","ID_NUMBER","ORGANIZATION","URL"],"type":"string"},"description":"Which kinds to redact. Default all except ORGANIZATION and URL"},"return_mapping":{"type":"boolean","default":true,"description":"Return placeholder to original value mapping"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dz366M_f19M4kd5UClPP7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Detects and removes or masks personally identifiable information (PII) from text using pattern matching and Claude Haiku for context-aware entity recognition","exampleAgentPrompt":"Before passing this support ticket to the logging system, redact all PII from it — replace emails, phone numbers, names, addresses, IBANs, and card numbers with labeled placeholders like [EMAIL_1], and give me back the mapping so I can reverse it if needed.","exampleUseCases":[{"title":"Sanitize support tickets before logging","prompt":"Take this customer support message and redact all personal info — names, emails, phone numbers, and any card numbers — using placeholders so the logs don't contain sensitive data. Return the mapping so we can look up the originals if a case escalates."},{"title":"GDPR-safe dataset preparation","prompt":"I have a batch of user-submitted feedback texts I need to anonymize before adding them to our training dataset. Strip out all PII — people's names, addresses, dates of birth, and ID numbers — and replace them with masks. Use the 'mask' mode so the redacted spans look like ████."},{"title":"Pre-LLM text scrubbing for agent pipelines","prompt":"Before you send this customer email to the other AI model for classification, please redact everything sensitive — emails, IBANs (checksum-verified), phone numbers, and any names — using placeholder mode, but keep our support address support@acme.com in place."}],"resultDescription":"Returns the redacted text with PII replaced according to the chosen mode (placeholder labels like [EMAIL_1], block masks ████, or full removal), plus an optional mapping object linking each placeholder back to its original value. Detected entity types include PERSON, EMAIL, PHONE, ADDRESS, IBAN, CARD, IP, DATE_OF_BIRTH, ID_NUMBER, ORGANIZATION, and URL.","failureModes":["Text exceeds 8,000 character limit — request is rejected","Invalid enum value for mode or types fields — validation error","Malformed input JSON — 400 bad request","Transient Claude Haiku availability issue causing contextual entity detection to fail","Payment not included or insufficient — 402 Payment Required","False negatives: contextual entities like names in unusual formats may be missed","False positives: legitimate non-PII text resembling patterns may be incorrectly redacted"],"whenToPreferThis":"Choose this endpoint when you need to scrub PII before passing text to another model, logging system, ticket tool, or dataset, and you want both pattern-based accuracy (Luhn-verified card numbers, IBAN checksum) and LLM-based contextual detection (names, addresses, dates of birth). Prefer it over simple regex approaches when mixed entity types are present or when compliance (GDPR, HIPAA) demands high recall. The placeholder-with-mapping feature is especially useful when you need to de-anonymize later in a controlled workflow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:44:58.151Z","isFirstParty":false,"canonicalSlug":"pii-redaction-and-anonymization-74186c3d"}