# Sentinel402 PII & Secret Batch Scanner

> Sentinel402 PII & Secret Batch Scanner is a paid API for AI agents from pii-guardrail.chronokey.workers.dev, paid per call via x402, $0.05/call, status unknown (last checked 2026-10-12).

Scans up to 20 text or JSON payloads in a single call for PII and secrets, returning risk scores, findings, and optionally redacted copies — paid via x402.

## Facts

- Endpoint: POST https://pii-guardrail.chronokey.workers.dev/v1/scan/batch?utm_source=zero.xyz
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sentinel402-pii-secret-batch-scanner-628ce21c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WvaDnJLOtgpfKuH6jBsCj

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 sentinel402-pii-secret-batch-scanner-628ce21c -d '<json body>'
```

Example prompt: Scan these 3 outbound messages for PII and redact anything found — use redact mode with medium as the minimum severity: 'Charge card 4111111111114242 for order 991', 'Contact bob@example.com or call 555-123-4567', 'Order received, thank you.'

## When to prefer this

Choose this endpoint when you need to scan multiple text or JSON items in a single paid call and want per-item risk scores, severity breakdowns, and optional in-place redaction. It is purpose-built for AI agent outbound guardrails where you need to prevent PII or secrets from leaking in generated responses. Prefer it over single-item scanners when processing batches of up to 20 items, and over generic content moderation APIs when you specifically need PII/secret detection with confidence scores and redacted output.

## Known failure modes

- Batch exceeds 20 items — API rejects with validation error
- Combined payload exceeds 32,000 characters — request rejected
- Invalid mode enum value — schema validation failure
- Payment not settled via x402 — 402 Payment Required returned
- Malformed JSON in payload field — parsing error
- Empty items array — minItems constraint violation

## How this service works

Paid tools for AI agents over x402: a PII and secret guardrail that scans outbound payloads, live citable data (crypto, weather, GitHub, sports, FX), and an RCP/1 retrieval server backed by that live data.

## Output

Returns a JSON object with per-item results including a 0–100 risk score, a decision (allow/redact/block), a list of findings with rule name, severity, confidence, character positions, and previews of matched spans, plus an optional sanitized version of the text. Also returns an aggregate risk score and counts across the batch, along with x402 payment settlement details.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "mode": {
   "enum": [
    "detect",
    "redact",
    "block"
   ],
   "type": "string",
   "description": "default detect; redact adds per-item sanitized copies"
  },
  "items": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "text": {
      "type": "string",
      "description": "Text to scan"
     },
     "payload": {
      "description": "Any JSON to scan instead of text"
     }
    }
   },
   "maxItems": 20,
   "minItems": 1,
   "description": "Up to 20 items; each {text: string} or {payload: <any JSON>}. Combined size <= 32000 chars."
  },
  "minSeverity": {
   "enum": [
    "low",
    "medium",
    "high",
    "critical"
   ],
   "type": "string"
  },
  "blockThreshold": {
   "type": "number",
   "description": "risk score that trips block mode"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "meta": {
   "batch": true,
   "engineVersion": "1.1.0"
  },
  "x402": {
   "network": "eip155:8453",
   "settled": true,
   "facilitator": "https://facilitator.payai.network",
   "transaction": "0xabc123"
  },
  "batch": {
   "mode": "redact",
   "items": 3,
   "flagged": 2,
   "scanned": 3,
   "maxItems": 20,
   "totalChars": 118
  },
  "results": [
   {
    "ok": true,
    "risk": 100,
    "index": 0,
    "counts": {
     "low": 0,
     "high": 0,
     "medium": 0,
     "critical": 1
    },
    "decision": "redact",
    "findings": [
     {
      "rule": "CREDIT_CARD",
      "count": 1,
      "label": "Credit / debit card number (PAN)",
      "samples": [
       {
        "end": 31,
        "start": 12,
        "preview": "[CREDIT_CARD:************4242]",
        "confidence": 0.99,
        "contextual": false
       }
      ],
      "severity": "critical",
      "confidence": 0.99
     }
    ],
    "sanitized": "Charge card [CREDIT_CARD:************4242] for order 991."
   },
   {
    "ok": true,
    "risk": 60,
    "index": 1,
    "counts": {
     "low": 0,
     "high": 2,
     "medium": 0,
     "critical": 0
    },
    "decision": "redact",
    "findings": [
     {
      "rule": "EMAIL",
      "count": 1,
      "label": "Email address",
      "samples": [
       {
        "end": 30,
        "start": 8,
        "preview": "[EMAIL:#a1b2c3]",
        "confidence": 0.97,
        "contextual": false
       }
      ],
      "severity": "high",
      "confidence": 0.97
     }
    ],
    "sanitized": "contact [EMAIL:#a1b2c3] / [PHONE_US:#d4e5f6]"
   },
   {
    "ok": true,
    "risk": 0,
    "index": 2,
    "counts": {
     "low": 0,
     "high": 0,
     "medium": 0,
     "critical": 0
    },
    "decision": "allow",
    "findings": []
   }
  ],
  "aggregate": {
   "risk": 100,
   "counts": {
    "low": 0,
    "high": 2,
    "medium": 0,
    "critical": 1
   },
   "decision": "redact"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/sentinel402-pii-secret-batch-scanner-628ce21c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pii-guardrail.chronokey.workers.dev](https://www.zero.xyz/host/pii-guardrail.chronokey.workers.dev/llms.txt)
