{"uid":"cap__aMF9k76L0Dg7GVIbeZkH","slug":"pii-detect-and-redact-api-49529964","name":"PII Detect-and-Redact API","description":"Small pay-per-call utility APIs for AI agents. Pay per request in USDC on Base via x402 (v2, exact scheme), or via MPP (Machine Payments Protocol, Tempo charge in OUSD/USDC.e; minimum $0.01). No accounts, no API keys.","url":"https://agent-utils-x402-production.revenue-agent-jw.workers.dev/v1/text/pii-redact?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["text"],"properties":{"text":{"type":"string","maxLength":2000,"description":"text to redact, URL-encoded"},"types":{"type":"string","description":"optional comma list of PII types"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"version":"2026-11-06","findings":[{"end":27,"type":"email","start":8,"placeholder":"[EMAIL]","matchPreview":"su***@example.com"}],"redacted":"Contact [EMAIL] or [PHONE] regarding order 1234567890123456.","unchanged":false,"countsByType":{"email":1,"phone":1}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_G2H0YYduvmFLD-TAVck5K","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Deterministically detects and redacts PII (email, phone, SSN, credit card, IP, IBAN, ABA routing, secret keys) from text, returning findings with offsets and a redacted copy.","exampleAgentPrompt":"Before I forward this customer support ticket to our LLM pipeline, scan it for PII and give me a redacted copy — here's the text: 'Hi, my name is Jane Doe, SSN 123-45-6789, card number 4111111111111111, email jane@example.com.'","exampleUseCases":[{"title":"Sanitize LLM prompts before processing","prompt":"I'm about to send this user message to GPT — can you first check it for any PII like emails, phone numbers, or credit card numbers and give me a clean redacted version? The text is: 'Please charge my Visa 4111111111111111 and email receipt to bob@company.com, my SSN is 078-05-1120.'"},{"title":"Redact sensitive data from support tickets","prompt":"We just got a support ticket that probably has personal info in it — run it through PII detection and show me what was found and a safe version I can store: 'Customer John Smith, phone 555-867-5309, account routing 021000021 is requesting a refund.'"},{"title":"Detect secret keys and credentials in chat logs","prompt":"Before archiving these chat logs, scan them for any leaked API keys or secrets — stuff like sk- prefixes or GitHub tokens — and tell me exactly where they appear: 'User pasted their key: sk-abc123XYZ and ghp_tokenABCDEFGH during the session.'"}],"resultDescription":"Returns a JSON object with: a 'redacted' string where PII is replaced by type placeholders like [EMAIL] or [PHONE], a 'findings' array with each match's type, start/end character offsets, placeholder used, and an anonymized preview, a 'countsByType' object tallying occurrences per PII type, an 'unchanged' boolean, and a 'version' field.","failureModes":["400 bad input if 'text' query parameter is missing or malformed","Text exceeding 2,000 characters on GET will be rejected (use POST for up to 32 KB)","Luhn-invalid card-like numbers will not be flagged as credit cards","Non-US IBAN or routing formats may not be recognized","Secret key prefixes outside the known set (sk-, ghp_, AKIA…) will not be detected","Payment required (402) if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need fast, deterministic PII detection without an LLM or NER model — ideal for compliance pipelines, pre-processing untrusted input before LLM ingestion, or any scenario where reproducibility and checksum-validated matching matter. Prefer over LLM-based redaction when you need exact character offsets, Luhn-validated card detection, or need to filter by specific PII type categories.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T01:10:14.474Z","isFirstParty":false,"canonicalSlug":"pii-detect-and-redact-api-49529964"}