# 24K Labs PII Redaction (Regex)

> 24K Labs PII Redaction (Regex) is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Deterministically masks emails, phone numbers, credit card numbers, IPv4 addresses, and US SSNs in text, returning redacted text and per-type match counts.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/pii-redact-regex
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-pii-redaction-regex-8563a4d6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GCMe1nUQco60SqeExfzZO

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 24k-labs-pii-redaction-regex-8563a4d6 -d '<json body>'
```

Example prompt: Scan this text and redact any emails, phone numbers, credit card numbers, IPv4 addresses, and SSNs — replace them with placeholders and tell me how many of each type you found: "Hi, my name is John and you can reach me at john@example.com or 555-867-5309. My SSN is 123-45-6789."

## When to prefer this

Choose this endpoint when you need fast, deterministic, rule-based PII redaction without ML inference overhead. It is ideal for log sanitization, pre-storage scrubbing, and compliance pipelines where consistent, reproducible masking of well-structured PII types (US SSN, email, IPv4, phone, credit card) is sufficient. Prefer it over ML-based alternatives when latency, cost, and determinism matter more than recall on ambiguous or international PII formats.

## Known failure modes

- Missing or empty input text returns an error or empty result
- Non-English or internationally formatted PII (e.g. non-US phone formats, non-US SSNs) may not be detected by the regex patterns
- Regex-based detection may produce false positives on numbers that resemble PII patterns
- Obfuscated or intentionally broken PII strings may evade detection
- Very long texts may hit payload size limits

## How this service works

Deterministically mask emails, phone numbers, credit-card-like numbers, IPv4 addresses, and US SSNs in text. Returns redacted text plus a per-type match count.

## Output

Returns the input text with all detected PII replaced by type-specific placeholders (e.g. [EMAIL], [PHONE], [SSN]), along with a structured count of how many matches were found per PII category (emails, phone numbers, credit card numbers, IPv4 addresses, SSNs).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mask": {
   "type": "string"
  },
  "text": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "counts": {
   "email": 1,
   "phone": 1
  },
  "redacted": "Reach me at [REDACTED] or [REDACTED]."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-pii-redaction-regex-8563a4d6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
