policies

Test Policies And Guardrails

Changed on

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

  • Base URL
    https://api.flock.io (the document declares no server; this is the origin it was published from)
  • URL
    https://api.flock.io/utils/test_policies_and_guardrails
  • Auth
    API key in header x-litellm-api-key

Request body

agent_idstring nullable

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

guardrail_namesstring[] nullable

Guardrail names to apply directly

input_type'request' | 'response'

Whether inputs are request or response

policy_namesstring[] nullable

Policy names to resolve guardrails from

request_dataobject

Request context (model, user_id, etc.)

Response

Successful Response

unknown required

Changes