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.sea-lion.ai (the document declares no server; this is the origin it was published from)
  • URL: https://api.sea-lion.ai/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

    • breaking

      the /////// request property type changed from object to no type

    • warning

      removed the request property ////////

    • warning

      removed the request property ////////

    • warning

      removed the request property ////////

    • info

      api tag policies added

    • info

      api tag utils removed

    • info

      added the new optional request property //

    • info

      added the new optional request property //////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property //////

    • info

      added the new optional request property //////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property /////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property ///////////

    • info

      added the new optional request property //////

    • info

      added the new optional request property /////////

    • info

      added the new optional request property //////

    • info

      added the new optional request property ////

    • info

      added the new optional request property /////

    • info

      added the new optional request property ////

    • info

      added the new optional request property /////

    • info

      added to the /////// request property anyOf list

    • info

      request property ///////// list-of-types was widened by adding types null to media type application/json

    • info

      request property ///////// list-of-types was widened by adding types null to media type application/json

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status