Skip to main content

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

ModeDetection methodOutput style
MASKEDNERAsterisks — ****
PROPRIETARYGuardian LayerAsterisks 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.

ValueUse forStatus
General (default)Business documents, general textAvailable
MedicalClinical notes, patient recordsComing soon
FinanceBanking, investment, trading documentsComing soon
CustomSpecialized or mixed-domain corporaComing soon