PII Redaction
Real-time NER-based masking at inference time.
In financial services, PII redaction is not optional. Eridian detects and masks sensitive entities in-memory before data reaches a model provider. Redaction runs at the gateway - not as a post-processing step in your application - so provider-bound payloads never contain raw regulated identifiers unless you explicitly disable the feature.
Entity Types
Eridian detects 12 entity types by default:
name, ssn, account_number, credit_card, email, phone, ip_address, date_of_birth, passport, routing_number, swift_code, and custom regex patterns.
| Entity | Example input | Default strategy |
|---|---|---|
ssn | 123-45-6789 | hash |
account_number | ACC-12345678 | hash |
email | analyst@bank.com | token |
| Custom regex | \\bACC-[0-9]{8}\\b | mask |
Masking Strategies
| Strategy | Behavior | Reversible |
|---|---|---|
hash | Replace with deterministic HMAC hash (default) | No |
mask | Replace with [REDACTED] | No |
token | Replace with typed token ([NAME_1], [EMAIL_2]) | No - tokens are session-scoped |
Deterministic hashing allows duplicate entities in the same request to map to the same token, preserving relational context for the model without exposing raw values.
Configuration
Project-default PII config applies to all inference unless overridden per request:
{
"pii_config": {
"entities": ["name", "ssn", "account_number", "email"],
"strategy": "hash",
"custom_patterns": ["\\bACC-[0-9]{8}\\b"],
"allowlist_domains": ["geteridian.com"]
}
}
Enable on any inference request:
{
"features": ["pii_redaction"],
"messages": [
{ "role": "user", "content": "Review wire transfer for John Smith, SSN 123-45-6789." }
]
}
Response Metadata
Responses include:
eridian.pii_redacted- count of entities maskederidian.pii_entities- array of entity types detected- Header
X-Eridian-PII-Redacted- mirrors the count for proxies and log pipelines
Audit logs store entity counts and types - never raw values - supporting GDPR and SOX examination workflows.
Zero-Data-Retention Interaction
With Zero-Data-Retention (Enterprise), prompts are not stored after inference completes. PII redaction still runs for in-flight processing; retention policies govern storage only.
Compliance Note
PII redaction runs at the Eridian gateway before routing to model providers. Combined with data residency routing policies, teams can ensure EU prompts never leave approved regions even when the selected model provider operates globally.
Error Codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_pii_config | Unknown entity type or malformed regex |
| 422 | pii_redaction_failed | Redaction engine timeout on oversized payload |
See Governance for policy versioning and Inference for feature flag usage.
Production API credentials are issued with an institution workspace. Contact sales if you need access.