Run a guardrails check
Evaluate text against the authenticated project’s enabled guardrails at runtime. Returns whether the text is allowed, the per-guardrail results, and any modified (e.g. redacted) text. A result with errored: true means that guardrail couldn’t run; its action follows the guardrail’s If the check can’t run setting, which defaults to applying the guardrail’s action. Requires x-api-key.
Send x-zespan-deadline-ms to tell Zespan how long you’ll wait. It fits its rules into that budget and answers in time; AI rules it had no time to start are returned as errored results, handled per their If the check can’t run setting, and listed in skippedForDeadline. The SDKs send this header automatically, set to their check timeout (5 seconds by default).
Guardrail executions and events are recorded a few seconds after the response, so a check you just ran can take a moment to appear in the dashboard. The stored reason is redacted with your project’s PII settings.
Authorizations
Headers
Body
1 - 50000"My card number is 4111 1111 1111 1111."
Only read by a require_confirmation rule (at most 10 entries are read; a malformed entry is dropped on its own). The confirmations your own app recorded for the current tool call, sent by the SDK. Each entry has ref (an opaque id), toolName, optional argsHash, kind, outcome, optional actorRole and ageMs. Text, tool results and arguments never count as a confirmation.
50Response
Guardrail evaluation result.
Sent only for a request with toolCallOnly: true, and only when the project has rules but none that read anything but reply text (any agent; an enabled template counts as a tool rule). The SDKs then skip tool-call-only checks for 60 seconds. Text checks never get it. Absent otherwise.

