LLM governance / policy control planePolicy Gateway
Azure AI Content Safety vs Policy Gateway
Azure AI Content Safety is a safety layer for Azure OpenAI models. Policy Gateway is the safety layer for your abliterated model.
The key difference is control: Azure enforces additive filters you cannot remove, while Policy Gateway gives you full control to define what is allowed.
Quick start
Service notes
- Pricing model: Usage-based pricing (~$5 per 1M tokens) billed on total tokens (input + output). See the API pricing page for current plans.
- Data retention: No prompt/output retention by default. Operational telemetry (token counts, timestamps, error codes) is retained for billing and reliability.
- Compatibility: OpenAI-style /v1/chat/completions request and response format with a base URL switch.
- Latency: Depends on model size, prompt length, and load. Streaming reduces time-to-first-token.
- Throughput: Team plans include priority throughput. Actual throughput varies with demand.
- Rate limits: Limits vary by plan and load. Handle 429s with backoff and respect any Retry-After header.
Summary comparison
| Capability | Azure AI Content Safety | Policy Gateway |
|---|---|---|
| Control Model | Provider-controlled (Additive) | Customer-controlled (Full) |
| Policy Definition | Microsoft's safety categories | Your policy-as-code rules |
| Refusal Behavior | Hard refusals for safety violations | Rewrite, redact, or refuse with custom reason codes |
| Audit Logs | Azure Monitor | Splunk, Datadog, Elastic, S3, Azure Monitor |
Choose Azure AI Content Safety when
- You are using Azure OpenAI models and must adhere to Microsoft's default safety standards.
- You do not need to customize the refusal logic or definitions of harmful content.
Choose Policy Gateway when
- You need full control over the safety policy (e.g., allowing medical or legal terms that might trigger generic filters).
- You want to replace 'I cannot help' refusals with helpful rewrites or redirections.
- You need unified audit logging to non-Azure SIEMs like Splunk or Datadog.
Common errors & fixes
- 401 Unauthorized: Check that your API key is set and sent as a Bearer token.
- 404 Not Found: Make sure the base URL ends with /v1 and you call /chat/completions.
- 400 Bad Request: Verify the model id and that messages are an array of { role, content } objects.
- 429 Rate limit: Back off and retry. Use the Retry-After header for pacing.