---
title: "Test Policy Template"
method: POST
path: "/policy/templates/test"
tags: ["policy management"]
---

# Test Policy Template

`POST /policy/templates/test`

## Request

- Base URL: `https://api.vibebrowser.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.vibebrowser.app/policy/templates/test`
- Auth: one of:
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`
  - API key in header `x-litellm-api-key`

Test a policy template's guardrails against a text input without creating them.

Instantiates temporary guardrails from the template definitions, runs them
against the provided text, and returns per-guardrail results so users can
verify the template solves their problem before creating it.

## Request body

- TestPolicyTemplateRequest
  - `guardrail_definitions` object[], required: All guardrailDefinitions from the policy template
  - `text` string, required: Test input text to run guardrails against

## Response `200`

Successful Response

- TestPolicyTemplateResponse
  - `overall_action` string, required
  - `results` GuardrailTestResultEntry[], required
    - `guardrail_name` string, required
    - `action` string, required
    - `output_text` string, required
    - `details` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/vibebrowser/apis/litellm-api.md) · [All operations](https://skmtc.dev/vibebrowser/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vibebrowser/apis/litellm-api/revisions/eea0b7e7b167?raw)
