utils

Test Policies And Guardrails

Apply policies and/or guardrails to inputs (for compliance UI testing).

Use inputs_list for batch testing: each input is processed as a separate call so per-input block/allow and errors are returned.

Use inputs for a single call (legacy).

post/utils/test_policies_and_guardrails

Request body

policy_namesstring[] nullable

Policy names to resolve guardrails from

guardrail_namesstring[] nullable

Guardrail names to apply directly

request_dataobject

Request context (model, user_id, etc.)

input_type'request' | 'response'

Whether inputs are request or response

agent_idstring nullable

When set, call chat completion with this model/agent for each input and include the response in the result.

Response

Successful Response

{"stackTrail":"paths:/utils/test_policies_and_guardrails:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}