{"uid":"cap_UTwbPSmSACoinTG-CZfwF","slug":"24k-labs-pii-redact-regex-ca3b05bf","name":"24K Labs PII Redact (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/v1/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_XgaNIXa7lVxIQyS7kcNpr","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 mask emails, phone numbers, credit-card-like numbers, IPv4 addresses, and US SSNs in text using regex, returning redacted text and per-type match counts.","exampleAgentPrompt":"Please redact all PII from this text — mask any emails, phone numbers, credit card numbers, IP addresses, and SSNs: 'Contact John at john.doe@example.com or 555-123-4567, card 4111-1111-1111-1111, IP 192.168.1.1, SSN 123-45-6789.'","exampleUseCases":[{"title":"Sanitize support ticket before logging","prompt":"Before we store this support ticket in our database, redact any PII — mask emails, phone numbers, credit card numbers, IPv4s, and SSNs in this text: 'Hi, my name is Alice, reach me at alice@corp.com or 212-555-9876, my card is 5500-0000-0000-0004 and my SSN is 987-65-4321.'"},{"title":"Privacy scrub for AI training data","prompt":"I need to anonymize this batch of user messages for training data — strip out all emails, phone numbers, SSNs, IP addresses, and credit-card-like numbers so no real personal info leaks into the dataset."},{"title":"Compliance redaction for audit log","prompt":"We have an audit log entry that may contain PII. Please mask any email addresses, phone numbers, SSNs, IPv4 addresses, or credit card numbers in it before it gets forwarded to our external auditor: 'User logged in from 10.0.0.5, email admin@company.org, called support at 800-555-0199.'"}],"resultDescription":"Returns the input text with all detected PII replaced by placeholder tokens (e.g. [EMAIL], [PHONE], [CREDIT_CARD], [IPV4], [SSN]), plus a structured count of how many instances of each PII type were found and replaced.","failureModes":["Empty or missing input text returns an error or empty redaction result","Unusual or non-standard PII formats not matching standard regex patterns may be missed","Very long text inputs may hit request size limits","Non-US phone number formats or international SSN equivalents will not be detected","Malformed request body returns a 4xx validation error"],"whenToPreferThis":"Choose this endpoint when you need fast, deterministic, rule-based PII redaction without ML overhead — ideal for compliance pipelines, log sanitization, or preprocessing text before storing or sharing. Prefer it over ML-based NER redaction when you want predictable, auditable regex behavior and only need to cover the five standard US PII types (email, phone, credit card, IPv4, SSN). Best suited for structured or semi-structured text where those patterns appear in recognizable formats.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:56:54.884Z","isFirstParty":false}