# PII Redaction API

> PII Redaction API is a paid API for AI agents from agents.crowdspark.me, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Scrubs personally identifiable information (emails, phones, SSNs, credit cards, IBANs, IPs, MACs, API keys, JWTs, private keys, wallet addresses) from text using label, hash, or star masking

## Facts

- Endpoint: POST https://agents.crowdspark.me/v1/text/pii-redact?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pii-redaction-api-271cb4ad
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yjwlwx6GUYSfwT1GLSMfp

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-redaction-api-271cb4ad -d '<json body>'
```

Example prompt: Before sending this user message to the AI model, scrub it for any PII — emails, phone numbers, SSNs, credit cards, API keys, wallet addresses — and replace each one with its label like [EMAIL] or [PHONE]: 'Hi, my name is John, reach me at john@example.com or 555-123-4567. My SSN is 123-45-6789.'

## When to prefer this

Choose this endpoint when you need fast, deterministic PII scrubbing before text reaches an LLM, a log store, or an analytics pipeline. It covers a broad set of sensitive entity types (emails, phones, SSNs, credit cards, IBANs, IPs, MACs, API keys, JWTs, private keys, and crypto wallet addresses) in a single call. It is especially useful for agents processing untrusted user input, sanitizing support tickets, or ensuring compliance before data storage. Prefer it over regex-based solutions when you need structured findings metadata (offsets, counts by type) in addition to the redacted text.

## Known failure modes

- Text exceeds 100,000 character limit — returns error
- Invalid mask value outside label/hash/star enum — returns validation error
- Malformed JSON body — returns 400 bad request
- Missing text field — returns validation error
- Rate limit exceeded without payment header — returns 402 or 429
- Network timeout on very large payloads

## How this service works

Free tier: 25 calls/day per IP with header X-Free-Call: 1 (or ?free=1), then pay per call. Scrub text before it goes to a model or a log: JSON body {text, mask} (max 100,000 chars). Finds emails, phones, SSNs, cards (Luhn), IBANs, IPs, MAC addresses, API keys, JWTs, private keys, wallet addresses. mask is label, hash or star. Returns redacted text and counts. Not stored.

## Output

A JSON object containing: 'redacted' (the sanitized text with PII replaced by mask tokens), 'findings' (array of objects with type, start, end, and length for each detected item), 'counts' (object mapping each PII type to the number of occurrences found), 'total_found' (integer total count), and 'mask' (the masking mode used).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mask": {
   "enum": [
    "label",
    "hash",
    "star"
   ],
   "type": "string",
   "description": "label (default) [EMAIL], hash [EMAIL:ab12cd34], or star"
  },
  "text": {
   "type": "string",
   "description": "Text to redact, max 100,000 characters"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mask": "label",
  "counts": {
   "email": 1,
   "phone": 1,
   "credit_card": 1
  },
  "findings": [
   {
    "end": 20,
    "type": "email",
    "start": 8,
    "length": 12
   }
  ],
  "redacted": "Contact [EMAIL] or [PHONE]. Card [CREDIT_CARD].",
  "total_found": 3
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pii-redaction-api-271cb4ad/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.crowdspark.me](https://www.zero.xyz/host/agents.crowdspark.me/llms.txt)
