Masking
masking_type: "redact" — replaces each detected value with ***** (first character
kept). Use it when the point is to show the value is gone: audit trails, compliance
review, anything where a realistic stand-in would mislead.
Python
from custodian_labs import GuardianLayer
result = GuardianLayer().deidentify_text_outputs(
"Dr. Emily Chen called Alex at 555-0100.",
masking_type="redact",
)
print(result.outputs[0].text) # "Dr. E***** C***** called A***** at 5*****."
TypeScript
const result = await new GuardianLayer().deidentifyTextOutputs(
"Dr. Emily Chen called Alex at 555-0100.",
{ maskingType: "redact" },
);
console.log(result.outputs[0].text);
Options are identical to Transform. redact output
is deterministic, so its single candidate is all you need.
Prefer no code? Use the Dashboard
Everything on this page also works in the Dashboard. Open API Testing, pick your key, paste text or upload a file, choose the mode and the types of data, then click Mask Now.
Want labels instead?
To show what kind of data was removed, use Placeholder mode. It
produces [NAME], [EMAIL] and similar labels.