Preview what the PII layer would do to texts (nothing is stored)
Run the fact-level PII layer on up to 50 texts with a pii lever (inline, from a stored profile, or the deployment default) and return each text anonymised, the masked entities with their offsets in the original, the coverage per language, and the text units the call cost. In block mode a text that carries PII is reported as blocked (an ingestion would drop that fact) and still shown masked. Nothing is stored and no text is logged; the only durable trace is the usage event (operation=pii_preview).
A workspace that is not entitled to the layer gets the floor only (regex, structured types) and a notice saying so.
Limits: 20000 characters in total (413 error), 60 requests per minute per integrator (429 detail, scope: pii_preview), 8 concurrent previews per API process (429 error PII_PREVIEW_CONCURRENCY_LIMIT with Retry-After), and the workspace's monthly token quota (429 detail TOKEN_QUOTA_EXCEEDED): a scan's text units are converted to an approximate token cost, so the layer and the LLM paths share one budget. Only a run on a metered detector is gated — one that runs in-process (regex) makes no external call, costs no tokens and always answers.
Validation errors, including PROFILE_NOT_FOUND and both pii and profile_id, answer 422 detail.
Request body
Response
Per-text results and the run summary; nothing was stored
Changes
Changed in 2 of the 18 revisions of this API.2
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ○
endpoint added
endpoint-added
- ○