Skip to main content
POST https://api.prysm1.com/v2/compliance/preview · Requires authentication
A pure dry-run of compliance routing: it classifies the prompt locally and applies your policy as a hard exclusion filter, then returns exactly what would happen — without calling any model. Because nothing is executed, it costs nothing and works even when no provider keys are configured. Use it to prove, before a cent is spent, that a request would only ever be routed to approved providers.
This endpoint lives under /v2, not /v1. The SDKs target it automatically with client.compliance_preview(...) (Python) / client.compliancePreview(...) (Node).

Authorization

string
required
Your secret key as a bearer token: Bearer prysm_sk_...

Body

string
The text to classify and gate. Provide either prompt or messages.
array
An OpenAI-style conversation; the last user message is classified. Used if prompt is omitted.
object
The Policy-as-Code spec. Every field is optional; an all-empty policy is inert (pass-through). See compliance routing for the model.
object
A BRAIN.md config whose compliance: block supplies the policy. Used when compliance is omitted; falls back to the server-discovered BRAIN.md.

Response

boolean
Whether a policy was in force. false means inert — all models eligible, and only the classification fields plus note are returned.
boolean
true if at least one approved model can serve the request. false is a hard stop — the policy excludes every model.
object
The compiled policy, echoed back (allowlist/denylist, jurisdictions, residency, required frameworks & certifications, blocked data classes, zero-retention).
string[]
Sensitive data classes found in the text, e.g. ["PII","FINANCIAL"]. Empty if none.
object
Per-class detail: each detected class maps to the kinds that matched (e.g. { "FINANCIAL": ["iban","credit_card"] }). Pattern matches only — never executed.
string[]
Model ids that survive the policy and could serve the request.
object
Map of excluded model id → list of human-readable reasons (e.g. jurisdiction 'US' not in ['EU']).
object
What staying compliant costs versus the cheapest unrestricted model.
object
The full exclusion decision: policy, policy_active, detected_classes, allowed, allowed_count, excluded, excluded_count, matrix_version.
string
A sample SHA-256 compliance receipt (sha256:...) for the cheapest compliant model — present when ok is true. The same shape attaches to real runs’ PrysmProof.
string
The Regulatory Compliance Matrix version used, e.g. rcm-2026.06-baseline.
string
Present only when active is false — explains the pass-through.

Errors