{"uid":"cap_R19GjgBBWUhEzQvC3R893","slug":"pii-credentials-redaction-0b1e0f02","name":"PII & Credentials Redaction","description":"Masks likely secrets and personal data in agent logs or chat text: 0x private keys (64 hex), labelled base58 private keys, JWTs, AWS access key ids, common API token prefixes (sk-, ghp_, xoxb-), payment card numbers that pass the Luhn check, and email addresses. Returns the redacted text and counts. Pattern-based: it can miss unusual formats and does not detect seed phrases or names.","url":"https://api.fadeandco.workers.dev/api/agent-intel/pii-credentials-redaction?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"Text to redact, 1 to 50000 characters"}}},"responseSchema":{"type":"json","example":{"note":"Pattern-based. Unusual formats, seed phrases and personal names are not detected.","total":3,"counts":{"email":1,"api_token":1,"payment_card":1},"source":"hand-written patterns","changed":true,"redacted":"Contact [EMAIL]. key=[API_TOKEN] card [CARD]","checkedAt":"2026-10-23T09:35:20.033Z"}},"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_nvmW5T8arsur3-iPMpdAE","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":"Redacts private keys, JWTs, API tokens, payment card numbers, and email addresses from text using pattern-based matching, returning the sanitized text and per-type counts.","exampleAgentPrompt":"Can you redact any secrets, API keys, email addresses, or payment card numbers from this log snippet before I store it: 'User john@example.com paid with card 4111111111111111, token sk-abc123xyz'?","exampleUseCases":[{"title":"Sanitize agent logs before storage","prompt":"Before we write these agent conversation logs to our database, can you scrub out any private keys, JWTs, API tokens, emails, or card numbers from this text: 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.payload.sig, contact admin@corp.com'?"},{"title":"Clean user input before forwarding","prompt":"A user just submitted this message and I want to forward it to a third party — please redact any credentials or personal data first: 'My Ethereum key is 0xabc123...64hexchars and you can reach me at alice@example.com'"},{"title":"Audit chat transcript for exposed secrets","prompt":"Can you scan this support chat transcript and mask any exposed secrets like API keys, payment cards, or email addresses, and tell me how many of each type were found?"}],"resultDescription":"Returns a JSON object containing the redacted version of the input text with sensitive patterns replaced by labeled placeholders (e.g. [EMAIL], [API_TOKEN], [CARD]), a boolean 'changed' flag indicating whether any redactions were made, a total count of redactions, a breakdown of counts by type (email, api_token, payment_card, etc.), and a checkedAt ISO timestamp. Also includes a note clarifying pattern-based limitations.","failureModes":["Text exceeding 50,000 characters will be rejected","Unusual or obfuscated secret formats not matching known patterns will be missed","Seed phrases and personal names are not detected","Non-standard API token prefixes outside known list (sk-, ghp_, xoxb-, etc.) will not be caught","Partial or truncated keys may evade pattern matching","Network or worker errors may return 402 if payment fails"],"whenToPreferThis":"Choose this endpoint when you need a fast, lightweight, pattern-based redaction pass over agent logs, chat text, or any string before logging, storage, or forwarding to third parties. It covers the most common credential and PII formats (private keys, JWTs, AWS key IDs, common API token prefixes, Luhn-valid card numbers, emails) without requiring a trained ML model. Prefer alternatives if you need to detect seed phrases, personal names, or highly customized secret formats.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:47:23.366Z","isFirstParty":false,"canonicalSlug":"pii-credentials-redaction-0b1e0f02"}