Skip to main content
POST
Guardrails Detect

Authorizations

apikey
string
header
required

Body

application/json
text
string
required
detectors
GuardrailsDetectorsObject · object
user_metadata
object

Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.

Example:

Response

200 - application/json

Successful Response

summary
GuardrailsDetectionResponseSummary · object
required
details
GuardrailsDetectionResponseDetails · object
required
result_message
string | null

Block message when a block-type detector triggers (custom or built-in default), revised text when only revise-type detectors trigger, or null when no detections fire.

user_metadata
object

Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.

Example: