Skip to main content
POST
Run a guardrails check

Authorizations

x-api-key
string
header
required

Project API key. Manage keys in the Zespan dashboard under project settings.

Body

application/json
text
string
required
Required string length: 1 - 50000
Example:

"My card number is 4111 1111 1111 1111."

phase
enum<string>
required

Whether this is checking input (pre) or output (post).

Available options:
pre,
post
traceId
string
spanId
string
model
string
Example:

"gpt-4o"

operation
string
estimatedCost
number
inputTokens
integer
agentName
string
Maximum string length: 200
toolName
string
Maximum string length: 200
recentToolCalls
object[]
Maximum array length: 100

Response

Guardrail evaluation result.

allowed
boolean
Example:

false

results
object[]
modifiedText
string | null
Example:

"My card number is [REDACTED]."