# 24K Labs PII Redact (Regex)

> 24K Labs PII Redact (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-15).

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

## Facts

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

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-redact-regex-ca3b05bf -d '<json body>'
```

Example prompt: Please redact all PII from this text — mask any emails, phone numbers, credit card numbers, IP addresses, and SSNs: 'Contact John at john.doe@example.com or 555-123-4567, card 4111-1111-1111-1111, IP 192.168.1.1, SSN 123-45-6789.'

## When to prefer this

Choose this endpoint when you need fast, deterministic, rule-based PII redaction without ML overhead — ideal for compliance pipelines, log sanitization, or preprocessing text before storing or sharing. Prefer it over ML-based NER redaction when you want predictable, auditable regex behavior and only need to cover the five standard US PII types (email, phone, credit card, IPv4, SSN). Best suited for structured or semi-structured text where those patterns appear in recognizable formats.

## Known failure modes

- Empty or missing input text returns an error or empty redaction result
- Unusual or non-standard PII formats not matching standard regex patterns may be missed
- Very long text inputs may hit request size limits
- Non-US phone number formats or international SSN equivalents will not be detected
- Malformed request body returns a 4xx validation error

## 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 placeholder tokens (e.g. [EMAIL], [PHONE], [CREDIT_CARD], [IPV4], [SSN]), plus a structured count of how many instances of each PII type were found and replaced.

## 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-redact-regex-ca3b05bf/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)
