# PII Redaction and Anonymization

> PII Redaction and Anonymization is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-12).

Detects and removes or masks personally identifiable information (PII) from text using pattern matching and Claude Haiku for context-aware entity recognition

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/pii-redact?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pii-redaction-and-anonymization-74186c3d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rUo0_zakEi9dWP_tsePKh

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-and-anonymization-74186c3d -d '<json body>'
```

Example prompt: Before passing this support ticket to the logging system, redact all PII from it — replace emails, phone numbers, names, addresses, IBANs, and card numbers with labeled placeholders like [EMAIL_1], and give me back the mapping so I can reverse it if needed.

## When to prefer this

Choose this endpoint when you need to scrub PII before passing text to another model, logging system, ticket tool, or dataset, and you want both pattern-based accuracy (Luhn-verified card numbers, IBAN checksum) and LLM-based contextual detection (names, addresses, dates of birth). Prefer it over simple regex approaches when mixed entity types are present or when compliance (GDPR, HIPAA) demands high recall. The placeholder-with-mapping feature is especially useful when you need to de-anonymize later in a controlled workflow.

## Known failure modes

- Text exceeds 8,000 character limit — request is rejected
- Invalid enum value for mode or types fields — validation error
- Malformed input JSON — 400 bad request
- Transient Claude Haiku availability issue causing contextual entity detection to fail
- Payment not included or insufficient — 402 Payment Required
- False negatives: contextual entities like names in unusual formats may be missed
- False positives: legitimate non-PII text resembling patterns may be incorrectly redacted

## How this service works

PII redaction for agent pipelines: remove personal data from text before it goes to another model, a log, a ticket system or a dataset. Emails, IBANs (checksum verified), card numbers (Luhn verified), phone numbers and IP addresses are found by exact patterns; names of people, street addresses, birth dates and ID numbers by Claude Haiku 5.5.

## Output

Returns the redacted text with PII replaced according to the chosen mode (placeholder labels like [EMAIL_1], block masks ████, or full removal), plus an optional mapping object linking each placeholder back to its original value. Detected entity types include PERSON, EMAIL, PHONE, ADDRESS, IBAN, CARD, IP, DATE_OF_BIRTH, ID_NUMBER, ORGANIZATION, and URL.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "keep": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "description": "Values to leave in place, e.g. your own support address"
  },
  "mode": {
   "enum": [
    "placeholder",
    "mask",
    "remove"
   ],
   "type": "string",
   "default": "placeholder",
   "description": "placeholder: [EMAIL_1]; mask: ████; remove: delete"
  },
  "text": {
   "type": "string",
   "description": "Text to redact, max 8,000 chars"
  },
  "types": {
   "type": "array",
   "items": {
    "enum": [
     "PERSON",
     "EMAIL",
     "PHONE",
     "ADDRESS",
     "IBAN",
     "CARD",
     "IP",
     "DATE_OF_BIRTH",
     "ID_NUMBER",
     "ORGANIZATION",
     "URL"
    ],
    "type": "string"
   },
   "description": "Which kinds to redact. Default all except ORGANIZATION and URL"
  },
  "return_mapping": {
   "type": "boolean",
   "default": true,
   "description": "Return placeholder to original value mapping"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pii-redaction-and-anonymization-74186c3d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsvc.io](https://www.zero.xyz/host/agentsvc.io/llms.txt)
