latestOpenAPI 3.1.02026-08-197104501.1 MB

8fbaab4fc7c5

policies

Test Policy Matching

Test which policies would match a given request context.

This is useful for debugging and understanding policy behavior.

Request body:

{
    "team_alias": "healthcare-team",
    "key_alias": "my-api-key",
    "model": "gpt-4"
}

Returns:

  • matching_policies: List of policy names that match
  • resolved_guardrails: Final list of guardrails that would be applied
post/policy/test

Request body

key_aliasstring nullable

API key alias from the request.

modelstring nullable

Model name from the request.

tagsstring[] nullable

Tags from key/team metadata.

team_aliasstring nullable

Team alias from the request.

Response

Successful Response

matching_policiesstring[] required
messagestring nullable
resolved_guardrailsstring[] required