{"uid":"cap_GCMe1nUQco60SqeExfzZO","slug":"24k-labs-pii-redaction-regex-8563a4d6","name":"24K Labs PII Redaction (Regex)","description":"Deterministically mask emails, phone numbers, credit-card-like numbers, IPv4 addresses, and US SSNs in text. Returns redacted text plus a per-type match count.","url":"https://api.24klabs.ai/api/pii-redact-regex","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mask":{"type":"string"},"text":{"type":"string"}}},"responseSchema":{"type":"json","example":{"counts":{"email":1,"phone":1},"redacted":"Reach me at [REDACTED] or [REDACTED]."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VFWU_qA4scTTcOCfIv-Ec","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deterministically masks emails, phone numbers, credit card numbers, IPv4 addresses, and US SSNs in text, returning redacted text and per-type match counts.","exampleAgentPrompt":"Scan this text and redact any emails, phone numbers, credit card numbers, IPv4 addresses, and SSNs — replace them with placeholders and tell me how many of each type you found: \"Hi, my name is John and you can reach me at john@example.com or 555-867-5309. My SSN is 123-45-6789.\"","exampleUseCases":[{"title":"Sanitize customer support logs","prompt":"Before we archive this support ticket, redact any personal info from it — emails, phone numbers, SSNs, anything sensitive — and tell me what was found: \"Customer Jane Doe, email jane.doe@gmail.com, called from 212-555-0198 about her account.\""},{"title":"Clean user input before database storage","prompt":"I need to scrub PII from this form submission before saving it to our database — mask any emails, credit card numbers, or phone numbers and give me back the safe version: \"Payment card 4111 1111 1111 1111, contact: support@acme.com, phone: 800-123-4567.\""},{"title":"Anonymize training data for ML pipeline","prompt":"I have a batch of raw user messages I want to use for model training, but first strip out all personally identifiable info like emails, IPs, SSNs, and phone numbers from this text: \"Server 192.168.1.1 sent alert to admin@corp.com, user SSN 987-65-4321 flagged.\""}],"resultDescription":"Returns the input text with all detected PII replaced by type-specific placeholders (e.g. [EMAIL], [PHONE], [SSN]), along with a structured count of how many matches were found per PII category (emails, phone numbers, credit card numbers, IPv4 addresses, SSNs).","failureModes":["Missing or empty input text returns an error or empty result","Non-English or internationally formatted PII (e.g. non-US phone formats, non-US SSNs) may not be detected by the regex patterns","Regex-based detection may produce false positives on numbers that resemble PII patterns","Obfuscated or intentionally broken PII strings may evade detection","Very long texts may hit payload size limits"],"whenToPreferThis":"Choose this endpoint when you need fast, deterministic, rule-based PII redaction without ML inference overhead. It is ideal for log sanitization, pre-storage scrubbing, and compliance pipelines where consistent, reproducible masking of well-structured PII types (US SSN, email, IPv4, phone, credit card) is sufficient. Prefer it over ML-based alternatives when latency, cost, and determinism matter more than recall on ambiguous or international PII formats.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:59:50.828Z","isFirstParty":false}