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

# Azure Content Safety

> Integrate Azure AI Content Safety with Bifrost for multi-modal content moderation, severity-based filtering, prompt shield, and custom blocklist support.

Bifrost integrates with **Azure AI Content Safety** to provide multi-modal content moderation powered by Microsoft's advanced AI models. This page covers the configuration and capabilities of the Azure Content Safety guardrail provider.

<img src="https://mintcdn.com/bifrost/cukTMCqLBY9L8bCo/media/guardrails/azure-config-on-bifrost.png?fit=max&auto=format&n=cukTMCqLBY9L8bCo&q=85&s=d669e4ce63d6717ddb319d6b48479db8" alt="Azure Content Safety configuration form" width="3888" height="2734" data-path="media/guardrails/azure-config-on-bifrost.png" />

## Capabilities

* **Severity-Based Filtering**: 4-level severity classification (Safe, Low, Medium, High)
* **Multi-Category Detection**: Hate, sexual, violence, self-harm content
* **Prompt Shield**: Advanced jailbreak and injection detection
* **Indirect Attack Detection**: Identify hidden malicious instructions
* **Protected Material**: Detect copyrighted content (output only)
* **Custom Blocklists**: Define organization-specific blocked terms

## Configuration Fields

| Field                            | Type    | Required | Default  | Description                                                  |
| -------------------------------- | ------- | -------- | -------- | ------------------------------------------------------------ |
| `endpoint`                       | string  | Yes      | -        | Azure Content Safety endpoint URL                            |
| `api_key`                        | string  | Yes      | -        | Azure subscription key                                       |
| `analyze_enabled`                | boolean | No       | true     | Enable content analysis for Hate, Sexual, Violence, SelfHarm |
| `analyze_severity_threshold`     | enum    | No       | "medium" | Severity level to trigger: `low`, `medium`, or `high`        |
| `jailbreak_shield_enabled`       | boolean | No       | false    | Enable jailbreak detection (input only)                      |
| `indirect_attack_shield_enabled` | boolean | No       | false    | Enable indirect prompt attack detection (input only)         |
| `copyright_enabled`              | boolean | No       | false    | Enable copyrighted content detection (output only)           |
| `text_blocklist_enabled`         | boolean | No       | false    | Enable custom blocklist filtering                            |
| `blocklist_names`                | array   | No       | -        | List of Azure blocklist names to apply                       |

## Collecting your API key and URL

Navigate to Azure foundry dashboard

<Frame>
  <img src="https://mintcdn.com/bifrost/QhwzFTmnYXQflIop/media/guardrails/azure-api-key.png?fit=max&auto=format&n=QhwzFTmnYXQflIop&q=85&s=ae2a51f52d520c308f2a4429ba508551" alt="Azure foundry dashboard" width="3020" height="2164" data-path="media/guardrails/azure-api-key.png" />
</Frame>

* Copy API key to use it in the Azure content moderation config form
* Copy project endpoint and use base URL as endpoint in the form. e.g. (`https://xxx-resource.services.ai.azure.com`)

## Severity Threshold Levels

| Threshold | Numeric Value | Behavior                                  |
| --------- | ------------- | ----------------------------------------- |
| `low`     | 2             | Most strict - blocks severity 2 and above |
| `medium`  | 4             | Balanced - blocks severity 4 and above    |
| `high`    | 6             | Least strict - blocks only severity 6     |

## Detection Categories

* Hate and fairness
* Sexual content
* Violence
* Self-harm

<Note>
  **Input-only features:** Jailbreak Shield and Indirect Attack Shield only apply to input validation. **Output-only
  features:** Copyright detection only applies to output validation.
</Note>

## Provider Capabilities Comparison

| Capability                    | AWS Bedrock | Azure Content Safety | GraySwan | Patronus AI |
| ----------------------------- | ----------- | -------------------- | -------- | ----------- |
| PII Detection                 | Yes         | No                   | No       | Yes         |
| Content Filtering             | Yes         | Yes                  | Yes      | Yes         |
| Prompt Injection              | Yes         | Yes                  | Yes      | Yes         |
| Hallucination Detection       | No          | No                   | No       | Yes         |
| Toxicity Screening            | Yes         | Yes                  | Yes      | Yes         |
| Custom Policies               | Yes         | Yes                  | Yes      | Yes         |
| Custom Natural Language Rules | No          | No                   | Yes      | No          |
| Image Support                 | Yes         | No                   | No       | No          |
| IPI Detection                 | No          | Yes                  | Yes      | No          |
| Mutation Detection            | No          | No                   | Yes      | No          |

For information on configuring guardrail rules and profiles, see [Guardrails](/enterprise/guardrails).
