> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guardion.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Policies

> Define guardrails once and reuse them across multiple applications. Configure detectors, targets, sensibilities and safe responses.

Policies are reusable guardrails that detect and control risky behavior in your AI applications. Define a policy once, assign it to one or many applications, and manage it centrally.

<Frame>
  <img src="https://mintcdn.com/guardionai/XGW4lfKWIdiSgIQF/images/policies_index.png?fit=max&auto=format&n=XGW4lfKWIdiSgIQF&q=85&s=6f4f9eae9c8499e4c975718ba2fb0a28" alt="Policies overview" width="4056" height="2840" data-path="images/policies_index.png" />
</Frame>

## How policies work

A policy describes what to detect, where to look, and how to respond:

* **Detector model**: The engine used to detect a risk
* **Target**: Which part(s) of the conversation to inspect, e.g. Assistant or User
* **Sensibility**: The minimum confidence required to flag
* **Expected behavior (coming soon)**: Defines the action taken when a detector is triggered (e.g., block or alert)
* **Override response**: Optional default message to return on violation

<Frame>
  <img src="https://mintcdn.com/guardionai/XGW4lfKWIdiSgIQF/images/policies_details.png?fit=max&auto=format&n=XGW4lfKWIdiSgIQF&q=85&s=a45a2b7b3db77671433a9b38dfea154c" alt="Policy details view with configuration" width="4056" height="2840" data-path="images/policies_details.png" />
</Frame>

### Detector types

Guardion supports several types of detectors, each designed to identify specific risks or policy violations in AI interactions. You can mix and match detector types within your policies to cover a wide range of threats.

#### **Supported types and models:**

**Prompt Security**

* **modern-guard-v1**: Fast, general-purpose prompt security and jailbreak detection
* **modern-guard-v1.5**: Advanced agentic prompt security and jailbreak detection

**Content Moderation**

* **moderation-v0**: Safety moderation for harmful content

Each detector type can be configured with its own threshold and target, allowing you to tailor policies to your application's needs.

See the [Detectors](/detectors) documentation for a full list and configuration options.

### Targets

Choose where the policy evaluates:

* **user**
* **assistant**
* **system**
* **developer**
* **context**

## Assign policies to applications

Policies are assigned per application. The relationship is:

* One policy can be used by many applications
* One application can enable one policies

To assign:

1. Go to the application
2. Click **Assign policy**
3. Select the policy and confirm

To learn more about assigning policies to applications, visit the [Applications](/platform/applications) page.

## Using policies via API

When calling the Guard API, Guardion will evaluate the policies assigned to the specified application. Provide your application ID in the request body.

```bash theme={null}
curl -X POST "https://api.guardion.ai/v1/guard" \
  -H "Authorization: Bearer $GUARDION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "application": "app_12345",
    "messages": [
      { "role": "user", "content": "Summarize this text" }
    ]
  }'
```

Optionally, override which policies run regardless the application:

```bash theme={null}
curl -X POST "https://api.guardion.ai/v1/guard" \
  -H "Authorization: Bearer $GUARDION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "override_enabled_policies": ["policy_pii"],
    "messages": [
      { "role": "user", "content": "Share a list of test credit cards" }
    ]
  }'
```

* See the full schema in [Guard API](/guard-api)
* Return shape includes `flagged`, `breakdown` (per-policy results), and optional `correction`

## Reviews and datasets (optional)

Use policy-focused reviews to iterate on performance, and build a dataset from your feedback to continuously improve detection.

<Frame>
  <img src="https://mintcdn.com/guardionai/XGW4lfKWIdiSgIQF/images/policy-dataset.png?fit=max&auto=format&n=XGW4lfKWIdiSgIQF&q=85&s=ea2e37471de0191e9838663b92a30a35" alt="Policy dataset built from feedback" width="3189" height="2160" data-path="images/policy-dataset.png" />
</Frame>
