Verify
The core endpoint for AI governance. Send a prompt, receive a decision.
Every governance decision starts here. Send a prompt; Palveron runs it through policies, NGE, and (optionally) LLM-assist; you get back a decision and a fully-attributed trace.
POST /api/v1/verify
curl -X POST https://gateway.palveron.com/api/v1/verify \
-H "Authorization: Bearer pv_live_..." \
-H "Content-Type: application/json" \
-d '{
"prompt": "My social security number is 123-45-6789.",
"metadata": { "agent_id": "ckagent..." },
"context": { "tool_name": "customer-support-ui" }
}'Request
| Field | Required | Description |
|---|---|---|
prompt | ✅ | The text to evaluate |
metadata | — | Free-form JSON object. metadata.agent_id attributes the request to a registered agent (omit it and the trace is recorded without agent attribution). metadata.source: "browser" marks Browser-Guard traffic. |
attachments | — | Array of multi-modal payloads (see Multi-modal) |
context | — | Request-origin context: tool_name, MCP server, chain depth, source system; passed through to traces |
structured_input | — | Optional structured field decomposition for tools with routing metadata (e.g. email:send). When present and the tool is known to the field-role registry, the response carries modified_fields. |
extracted_text | — | Legacy: pre-extracted text from images/PDFs. Prefer attachments. |
request_id | — | Optional idempotency key (at most 128 characters). If the same value is sent again after the first request completed, the gateway answers with the same trace_id and "replayed": true instead of creating a second trace. If it arrives while the first request is still running, the gateway answers 409 verify_request_in_progress; if the same value arrives with different content, 409 verify_request_id_conflict. |
Agent attribution uses the top-level
agent_idfield (preferred);metadata.agent_idremains as a fallback for older clients. With neither, the trace is recorded without agent attribution.
Response
{
"decision": "ANONYMIZED",
"output": "My social security number is [SSN_1].",
"reason": "Personal data was detected in this request and protected before it was passed on. Anonymized: Social security number (1).",
"trace_id": "cktrace...",
"integrity_hash": "sha256:...",
"flare_status": "PENDING",
"should_anchor": true,
"content_type": "text",
"categories": [{ "id": "SSN", "label": "Social security number", "count": 1 }],
"labels_language": "en",
"observed_policies": []
}| Field | Description |
|---|---|
decision | The governance verdict (see below) |
output | The content to forward to your LLM. On MODIFIED this is the masked (anonymized or redacted) or edited prompt; on PASSED the original. |
reason | Human-readable explanation (present when a policy fired). When the gateway masked personal data, the sentence in the language of the request reads "Personal data was detected in this request and protected before it was passed on.", followed by "Redacted: {categories}." and "Anonymized: {categories}." where they apply; {categories} are the names with the number of distinct values, such as "Person name (2)". |
reason_code | Only when present: machine-readable code for reason. For sending with a justification in the browser: justification_unavailable (see below). |
trace_id | Tamper-evident trace record id; use it in the Trace Explorer, exports, and POST /api/v1/verify-proof |
integrity_hash | Integrity value of the record (SHA-256, 64 hex characters) |
flare_status | Blockchain anchoring status of the trace (e.g. PENDING), when Flare is active |
should_anchor | Whether this trace qualifies for blockchain anchoring |
content_type | Detected content type (text, image, audio, document, …) |
categories | The detected categories of personal data, each with id (stable identifier, such as SSN), label (name in the language of the labels) and count (number of distinct values). Empty when none were detected. |
labels_language | The language of the label texts in categories and reason (such as de, en). |
findings | Only on multi-modal requests: findings per attachment |
enforcement_action | Only on Browser-Guard requests: browser enforcement action (BLOCK, WARN, JUSTIFY, REDIRECT) |
action_config | Only with enforcement_action: its configuration (e.g. redirect target) |
error_class | Only on fail-closed/engine-error verdicts: machine-readable failure class (e.g. llm_4xx) |
modified_fields | Only on structured_input requests: per-field result map (ROUTING preserved, CONTENT masked) |
justification | Only in answers to Browser Guard, when the prompt can be sent with a justification in the browser: what may go in clear text and what stays masked (see below) |
Optional fields are omitted from the JSON entirely when not applicable.
Per-policy NGE scores, detected entities, and match details are not part of the verify response; they are recorded on the trace. Retrieve them via the Traces API or the Trace Explorer.
Decisions
PASSED: Request allowed, original prompt inoutput.BLOCKED: Request rejected.reasonexplains why.MODIFIED: Request allowed with edits.outputcontains the masked (anonymized or redacted) version.FLAGGED: Request allowed; aLOG_ONLYpolicy fired and the violation is recorded in the trace. If the flagged prompt carries detected personal data or credentials, they are masked before being passed on and the verdict is relabelledANONYMIZED(orREDACTEDfor credentials); the triggering rule stays recorded as an observed policy on the trace. The response fieldobserved_policieslists these observed policies (always present,[]when there is none).ANONYMIZED: Request allowed; detected personal data was masked,outputcontains the masked version.REDACTED: Request allowed; detected credentials were redacted,outputcontains the redacted version.PENDING_APPROVAL: Request queued for a human approver. Track the outcome viaGET /api/v1/approvals/status?trace_id=....POLICY_CHANGE: Request allowed; it triggered a governance/policy-change event rather than a content verdict.
Sending with a justification in the browser
When the gateway detected personal data in a prompt from Browser Guard, employees can send the prompt with a justification. Only categories that allow a justification go in clear text: person name, address, email address and phone number. The gateway does not mask company names and places; if your project always masks them (Settings → Security), they stay masked and cannot be justified. IBAN, credit card, social security and tax numbers, ID numbers, credentials and every other category stay masked. In this case the answer carries the field justification:
| Field | Meaning |
|---|---|
state | available: the browser may send with a justification. unavailable: the prompt could not be fully checked for personal data; sending with a justification is not possible. |
output | Only for available: the text that is sent with a justification. Justifiable categories appear in clear text, all others masked as in the output of the answer. |
released | The justifiable categories that go in clear text, each with label, name and count |
still_masked | The categories that stay masked and cannot be released, each with label, name and count |
label is the identifier of the category (such as IBAN), name its word in the language of the request (such as "Person name"), count the number of distinct values. The clear text of a masked detail never appears in the answer. The text in output is never stored; the request records only the label and count of the categories.
With state: "unavailable", enforcement_action is BLOCK, reason_code is justification_unavailable, and reason reads: "This prompt could not be fully checked for personal data. Sending with a justification is therefore not possible, and the prompt was not sent. Please try again later." The verdict in decision stays the gateway's verdict.
What was actually sent after the choice is stated in the record of the request (see the Traces API).
HTTP status codes
The HTTP status code mirrors the decision field, so load balancers, observability tools, and HTTP-aware clients (e.g. MCP / OpenClaw consumers) get a faithful signal without having to parse the JSON body.
| Status | Decision | Meaning |
|---|---|---|
200 OK | PASSED / MODIFIED / FLAGGED / ANONYMIZED / REDACTED / POLICY_CHANGE | Request allowed. Forward output to your LLM. |
202 Accepted | PENDING_APPROVAL | Human approval required. The trace is persisted; the approval is tracked via trace_id. |
403 Forbidden | BLOCKED | Request denied by policy or capability model. Do not retry; inspect reason. |
429 Too Many Requests | no decision | Tier rate-limit hit. Honour the Retry-After header. Body is the rate-limit error, not a verify response. |
400 Bad Request | no decision | Malformed request (e.g. missing prompt). error.code is validation_error. |
409 Conflict | no decision | Repeated request_id: the first request is still running (verify_request_in_progress) or the same request_id arrived with different content (verify_request_id_conflict). |
503 Service Unavailable | no body | The gateway could not durably record the governance decision (DB and DLQ unavailable). Retry with backoff. |
503 Service Unavailable | no decision | checks_warming_up: the gateway is loading its models after a start. Honour the Retry-After header and send again. |
The JSON body is the source of truth. A response with a decision field is a verify response regardless of status (200 / 202 / 403). Clients should branch on decision, not on response.ok. Reserve HTTP-status branching for 429 (rate limits) and 5xx (transport errors).
Resilience headers
Every governance response carries three headers:
| Header | Values |
|---|---|
X-Palveron-Status | healthy | degraded: platform health rollup |
X-Palveron-Trace-Persisted | db | dlq | none: where this request's trace landed |
X-Palveron-Degraded-Subsystems | Comma-separated list; omitted entirely when healthy (header absence is the fast "all good" probe) |
Errors
Distinct from a governance BLOCKED (which is a 403 with a verify-shaped body), transport/validation errors return a structured error object:
{ "error": { "code": "validation_error", "message": "Prompt is required", "request_id": "req-..." } }Messages are localized (Accept-Language); branch on error.code (for example validation_error), and quote error.request_id in support requests.
Tip: distinguish a transport error from a governance block by checking for the
decisionfield. If it's present, the response is a verify outcome (parse the body). If it's absent, treat the status code as a transport/auth error.
Retry behavior
POST /verify is not idempotent: a retry creates a second trace. Retry only on transient failures (timeouts, 429 honouring Retry-After, 5xx) with exponential backoff and jitter, and treat 403/400 as final.