redact
Redact personal data (email, phone, cards, SA ID, SSN, IP, IBAN, names, custom terms) from text, replacing each value with a stable token like [EMAIL_1]. Call this before putting sensitive text into a prompt or context. NOTE: detection is automated and is not a guarantee; it can miss personal data. Review the output before relying on it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to redact. | |
| reject | No | Finding ids (from a preview) to leave unredacted — a human said 'not PII here'. | |
| preview | No | Dry run: return what WOULD be redacted (type, confidence, rationale) without changing the text or consuming quota. | |
| detectors | No | Optional map of detector→bool to override defaults. | |
| customTerms | No | Extra literal terms to always mask (custom PII). | |
| customPatterns | No | Custom PII as regexes, e.g. {type:'EMPID', pattern:'EMP-\\d{5}'}. |