Skip to main content

Guardian Layer Quickstart

Try Guardian Layer in the Dashboard with no code, then make the same call from your own code.

Get an API key​

Sign up, then click Get Started Free on Subscriptions. Activating a plan creates your key. Signing in alone doesn't. Copy it from API Keys. It starts with custodian_labs_.

Try it in the Dashboard​

Open API Testing, select your key and choose Enter Text. Paste the text below, pick All PII, then Transform, then Mask Now.

Please contact Jane Smith at jane.smith@example.com or call (415) 555-0123.

The result appears in Results. Try Redact to see ***** output instead.

To try a file, save the text below as sample.txt. Then choose Upload File, run it, and download the result. CSV, Word and PDF files work too.

sample.txt
Customer: Jane Smith
Email: jane.smith@example.com
Phone: (415) 555-0123

Call it from code​

export CUSTODIAN_API_KEY="custodian_labs_..."

curl -X POST "https://privacy.custodianlabs.io/api/v1/deidentify/text/proprietary/outputs" \
-H "X-API-Key: $CUSTODIAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Please contact Jane Smith at jane.smith@example.com.", "masking_type": "transform"}'

Next​

You want toGo to
De-identify a CSV or Excel fileCSV and Excel guide
De-identify a Word document or PDFWord guide · PDF guide
Strip PII before calling an LLMMask PII before any LLM
See every endpoint and fieldGuardian Layer API