# PII & Credentials Redaction

> PII & Credentials Redaction is a paid API for AI agents from api.fadeandco.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-30).

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.

## Facts

- Endpoint: POST https://api.fadeandco.workers.dev/api/agent-intel/pii-credentials-redaction?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pii-credentials-redaction-0b1e0f02
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R19GjgBBWUhEzQvC3R893

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability pii-credentials-redaction-0b1e0f02 -d '<json body>'
```

Example prompt: 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'?

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to redact, 1 to 50000 characters"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pii-credentials-redaction-0b1e0f02/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fadeandco.workers.dev](https://www.zero.xyz/host/api.fadeandco.workers.dev/llms.txt)
