Compliance Modes
The compliance_mode field on POST /api/v1/deidentify/text controls how entities are detected and what the output looks like.
Available modes
| Mode | Detection method | Output style |
|---|---|---|
MASKED | NER | Asterisks — **** |
PROPRIETARY | Guardian Layer | Asterisks or transformed text |
GDPR, HIPAA, and CUSTOM modes are in development. See Coming Soon for details.
MASKED
Replaces detected PII with asterisks. Straightforward and format-agnostic.
import requests
response = requests.post(
"https://api.custodianai.com/api/v1/deidentify/text",
headers={"X-API-Key": "cai_your_key_here"},
json={
"text": "Call Sarah at (415) 555-0123 or email sarah@example.com.",
"compliance_mode": "MASKED",
},
).json()
print(response["output_text"])
# "Call **** at ************** or email *****************."
PROPRIETARY — Guardian Layer
Activates Guardian Layer's proprietary detection. See Guardian Layer for the full parameter reference and examples.
domain parameter
The domain field tunes Guardian Layer detection to your content type. Currently only General is available — see Coming Soon for upcoming domains.
| Value | Use for | Status |
|---|---|---|
General (default) | Business documents, general text | Available |
Medical | Clinical notes, patient records | Coming soon |
Finance | Banking, investment, trading documents | Coming soon |
Custom | Specialized or mixed-domain corpora | Coming soon |