APIData protection

Preview LLM judge

Run the LLM judge once against a sample response (rule-editor sandbox). `binding_id` runs against a specific candidate instead of the active one.

POST
/dlp/judge/preview

Run the LLM judge once against a sample response (rule-editor sandbox). binding_id runs against a specific candidate instead of the active one.

Authorization

ApiKeyAuth
headerAuthorizationBearer <token>

Bearer token authentication. Send an API key (a saai_api_-prefixed token) as Authorization: Bearer <token>.

Required permission

manage_data_protection

Request Body

application/json
  1. body
instruction*string
Length1 <= length <= 2000
sample*string

Sample response text to judge; the server enforces the configured judge cap (default 128 KiB).

Lengthlength <= 1048576
binding_id?uuid
Formatuuid

Response Body

The request has succeeded.

application/json
  1. response
spans*array<string>

Verbatim spans the judge flagged.

redacted*string

sampleDocument with every span replaced by [REDACTED].

judged*string

The document the judge actually received: the sample serialized as a tool response is at runtime (a JSON sample is flattened to its values), then shaped for the prompt by dropping blank and repeated lines. Lets the tester show exactly what the model saw.

sample_document*string

The same serialization without the prompt shaping, so blank and repeated lines survive. Lets the tester render the redaction preview in the shape of the admin's own sample rather than the reflowed prompt.

curl -X POST "https://example.com/dlp/judge/preview" \  -H "Content-Type: application/json" \  -d '{    "instruction": "string",    "sample": "string"  }'
{  "spans": [    "string"  ],  "redacted": "string",  "judged": "string",  "sample_document": "string"}