POST /api/v1/deidentify/text/proprietary/outputs
Runs Guardian Layer and returns two independently de-identified versions of the input text. Useful for review workflows or generating synthetic training data from sensitive documents.
Request
POST /api/v1/deidentify/text/proprietary/outputs
X-API-Key: cai_your_key_here
Content-Type: application/json
Body
{
"text": "The Meridian account is managed by Dana Reyes.",
"domain": "General",
"masking_type": "transform",
"pii_entities": null
}
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
text | string | Yes | — | The text to de-identify |
domain | string | No | "General" | General, Medical, Finance, or Custom |
masking_type | string | No | "transform" | redact replaces with *****; transform replaces with a plausible alternative |
pii_entities | string[] | No | all | Entity types to target. Pass null or ["ALL"] for everything. See Supported Entities |
Response 200 OK
{
"original_text": "The Meridian account is managed by Dana Reyes.",
"outputs": [
{"id": 1, "text": "The Pinnacle account is managed by Lisa Torres."},
{"id": 2, "text": "The Nexus account is managed by Kim Patel."}
],
"mode": "PROPRIETARY_OUTPUTS",
"meta": {
"plan_name": "professional"
}
}
| Field | Type | Description |
|---|---|---|
original_text | string | The unmodified input text |
outputs | array | Two de-identified alternatives, each with id and text |
mode | string | Always "PROPRIETARY_OUTPUTS" |
meta | object | Request metadata |
Example
import requests
response = requests.post(
"https://api.custodianai.com/api/v1/deidentify/text/proprietary/outputs",
headers={"X-API-Key": "cai_your_key_here"},
json={
"text": "The Meridian account is managed by Dana Reyes.",
"domain": "General",
"masking_type": "transform",
},
).json()
print(response["outputs"][0]["text"]) # first alternative
print(response["outputs"][1]["text"]) # second alternative
Error responses
| Status | Description |
|---|---|
401 | Missing or invalid API key |
403 | Key expired or character limit reached |
422 | Missing or invalid request body |