Head to head · Prompt injection detection · October 2026 research run
Azure AI Content Safety (Prompt Shields) vs OpenAI Guardrails
OpenAI Guardrails scores 71.7 (BB) on agent readiness against Azure AI Content Safety (Prompt Shields)'s 68 (B), and leads in 2 of 7 scored categories. Azure AI Content Safety (Prompt Shields) leads on schema & documentation, agent ergonomics and security & auth. Both do prompt injection detection.
Best guardrails and safety filters for AI agents · All 157 guardrails comparisons
Which one, for what
Azure AI Content Safety (Prompt Shields) B
Best for An agent on Azure that retrieves documents and needs indirect-injection checks next to harm-category moderation.
Ahead on
- Schema & documentation, 74 against 66
- Agent ergonomics, 78 against 73
- Security & auth, 86 against 59
Also in its favour
- A hosted endpoint, with nothing to install
Watch for
Needs an Azure subscription with a card, a resource and a region that has the feature, before the first call
Best for Teams already on the OpenAI client or Agents SDK that want several checks from one config file with little code.
Ahead on
- Payments & pricing, 90 against 23
- Maintenance & community, 89 against 35
Also in its favour
- Agent-ready, a grade of BB or better
- Open source
Watch for
By default a check that fails to run returns tripwire_triggered=False, so the request continues. Strict mode is opt-in
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Payments & pricing OpenAI Guardrails +67
Azure AI Content Safety (Prompt Shields) 23
No x402, MPP or L402 (0). Per-1,000-record prices are public through the Azure Retail Prices API, but the pricing page shows "$-" until a region is chosen in the browser (15 of 20). F0 gives 5,000 free text records and 5,000 images a month, but it needs an Azure subscription and an Azure account needs a card (0). A person signs up and creates the resource in a browser (0). Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 15 is 23.
OpenAI Guardrails 90
Self-hosted rule. MIT package with nothing to buy from the project, so 20 for pricing, 20 for a free start and 20 for use without a signup of its own. No payment protocol (0). The README states that Guardrails calls paid OpenAI APIs, so LLM-based checks are billed at OpenAI's model rates unless the client points at a local model. The moderation check page says that call has no cost. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.
Maintenance & community OpenAI Guardrails +54
Azure AI Content Safety (Prompt Shields) 35
Read as a closed service with official SDKs, from Microsoft's dated sources as the other Azure listings are. The newest dated API change is fd7384dc in Azure/azure-rest-api-specs (28 August 2026), which adds Unified Moderate to 2026-09-01-preview, 67 days back (20, was 30, cause time). Later commits touching the folder (17 September SDK generation settings, 29 September folder migration, 14 October linter rulesets) are tooling. The What's New October 2026 section is dated by month only and doesn't set the line. SDK pre-releases on 14 September (Python 1.1.0b1, Java 1.1.0-beta.1) and 18 September (.NET 1.1.0-beta.1, and @azure/ai-content-safety 1.0.0-beta.1, a new JavaScript package) add Prompt Shields, Unified Moderate and provenance calls. Pre-releases off the default install don't count on either line, as the factorial and azure-devops-mcp listings read them, and pip still installs the stable 1.0.0. In the 90 days from 5 August the 28 August spec change counts once. Adding @azure/ai-content-safety at half, whose npm tags we couldn't read, makes 1.5, still under three (0). Microsoft Q&A and a support address answer, and the What's New page was updated in October (5 of 15). The stable SDKs still lag the service, Python 1.0.0 from December 2023 and @azure-rest/ai-content-safety 1.0.1 from January 2025, neither with a Prompt Shields helper (5 of 15). Stable packages unchanged for 35 and 22 months (5 of 10). 20 + 0 + 5 + 5 + 5 = 35.
OpenAI Guardrails 89
0.3.4, 0.3.5 and 0.3.6 were tagged on 26 October 2026, 6 days before the check. 0.3.4 and 0.3.6 change the package's code, while 0.3.5 only bumps a CI action (30). In the 90 days from 3 August, 0.3.2 on 21 August, 0.3.3 on 10 September and the three October releases (20). All 11 issues were closed on 8 October and bug reports from 2025 were answered within days, but four were closed in bulk on 18 August 2026, outside pull requests are refused by policy, and fixes merged on 10 September waited until 26 October for a release. Issues weren't re-read on 1 November (15 of 25). Current official packages on PyPI and npm, @openai/guardrails at 0.3.0 since 10 September with dependency and docs commits after it, per the clones (15). Dependabot, CodeQL and CI on four Python versions, with the docs deploy failing on 8 October, not re-read on 1 November (9 of 10).
Security & auth Azure AI Content Safety (Prompt Shields) +27
Azure AI Content Safety (Prompt Shields) 86
Microsoft Entra ID tokens with RBAC, or two resource keys that can be regenerated in turn (30). RBAC can limit a caller, but a resource key also reaches the blocklist write and delete operations, with no confirmation step (15 of 20). Prompt Shields detects user-prompt and document attacks, and the docs describe Spotlighting for third-party content, in preview (15). The Foundry Tools diagnostic logging page describes Audit and RequestResponse logs through Azure Monitor for Cognitive Services resources once the owner adds a diagnostic setting, as the Document Intelligence listing reads it. We didn't confirm the fields for Content Safety (12, was 0). Coordinated disclosure policy and MSRC bounty programmes linked from security.txt, but microsoft.com's security.txt passed its Expires date on 23 September 2026 and still carries it on 3 November (4 of 5), bounty (5), SOC or ISO coverage for Content Safety by name not confirmed (0), MSRC publishes advisories (5), so 14 of 20. An MSRC affected-product search on 3 November finds no CVE naming Content Safety. The 2026 Azure AI Foundry CVEs name Foundry, not this service, so no deduction, as on the Speech, Translator and Document Intelligence listings. 30 + 15 + 15 + 12 + 14 = 86.
OpenAI Guardrails 59
Framework reading. No credential of its own. It uses the OpenAI API key, or the key of whichever compatible endpoint is set, from the environment or the constructor (10 of 30). The prompt injection check runs before and after each tool call in the Agents SDK and can reject or halt, but there is no human approval step, and check failures pass by default (10 of 20). Jailbreak and prompt injection detection are the product, with a published benchmark in which the default model scores 0.000 recall at a 1 per cent false positive rate (13 of 15). Per-call results with check name, stage, confidence and token usage, and no log sink of its own (9 of 15). SECURITY.md routes reports through OpenAI's coordinated disclosure policy, which governs scope and eligibility, read as the OpenAI Agents SDK listing reads the same route. security.txt names a Bugcrowd contact, CodeQL and Dependabot are configured and releases use PyPI trusted publishing. 3 points are held back because the check bypasses fixed in 0.3.3 and 0.3.4 were released as bug fixes with no advisory (17 of 20).
Schema & documentation Azure AI Content Safety (Prompt Shields) +8
Azure AI Content Safety (Prompt Shields) 74
Public OpenAPI (Swagger) documents in Azure/azure-rest-api-specs, with stable 2024-09-01 and previews up to 2026-09-01-preview, error schemas and examples on all 15 operations (25). learn.microsoft.com has no llms.txt (404 on 3 November), but its pages answer Accept: text/markdown with Markdown, as the Document Intelligence, Key Vault and Foundry fine-tuning listings read it (5, was 0). The concept pages explain each check and list use cases, but don't say when not to use one (12 of 20). Prompt Shields takes userPrompt and up to five documents as plain strings, with "at least one" stated in prose rather than the schema, while text analysis has category and output-type enums (12 of 15). Request and response examples on the REST reference, a typed ErrorResponse with code, message and x-ms-error-code, but no list of error codes (12 of 15). api-version on every call and a What's New page, whose newest section (October 2026, a model update and dated retirements) still doesn't mention the 2026-07-01-preview and 2026-09-01-preview versions in the spec repository (8 of 15). 25 + 5 + 12 + 12 + 12 + 8 = 74.
OpenAI Guardrails 66
Framework reading. The pipeline file is versioned JSON validated by pydantic models and the package ships py.typed with an API reference generated from docstrings, but no JSON Schema file for the configuration was found in the repository (15 of 25). llms.txt on the docs site returns 404 (0). Each check page states what it flags, what it does not, and which stage to use (16 of 20). Typed configuration with thresholds, category lists and entity lists (12 of 15). Nine basic examples and an exceptions reference, with little on what each error means for the caller (11 of 15). Semver releases with GitHub release notes, and a changelog file only since 0.3.3 (12 of 15). The docs deploy workflow failed on main on 8 October 2026.
Agent ergonomics Azure AI Content Safety (Prompt Shields) +5
Azure AI Content Safety (Prompt Shields) 78
Prompt Shields answers one boolean per prompt and per document, and text analysis returns four or eight severity levels by choice (20 of 25). Categories, output type and haltOnBlocklistHit are set per request (20). Errors carry a code and message in a standard Azure shape, but the codes aren't documented per operation (15 of 20). Checks have no side effects, but there's no retry guidance (15 of 20). Few required fields, but the Python SDK is 1.0.0 from 12 December 2023 with no Prompt Shields method, and the JavaScript package is a generic REST client, 1.0.1 from January 2025 (8 of 15).
OpenAI Guardrails 73
Framework reading. GuardrailsOpenAI replaces OpenAI with one config argument, and results sit on response.guardrail_results (22 of 25). Confidence thresholds, max_turns, include_reasoning off by default and suppress_tripwire control what comes back, and total_guardrail_token_usage reports the cost (15 of 20). Typed exceptions carry the check name and stage, but a check that fails to run is reported as not triggered unless raise_guardrail_errors=True (12 of 20). Checks are stateless and safe to repeat, each LLM-based check is an extra model call, and streaming can show output before an output check trips (12 of 20). Python and TypeScript packages, few required parameters, and a spaCy model to install by hand for Contains PII (12 of 15).
Score by category
| Category | Weight | Azure AI Content Safety (Prompt Shields) | OpenAI Guardrails | Edge |
|---|---|---|---|---|
| Reliability | 16% | 75 | 73 | Azure AI Content Safety (Prompt Shields) +2 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 74 | 66 | Azure AI Content Safety (Prompt Shields) +8 |
| Agent ergonomics | 13% | 78 | 73 | Azure AI Content Safety (Prompt Shields) +5 |
| Security & auth | 14% | 86 | 59 | Azure AI Content Safety (Prompt Shields) +27 |
| Payments & pricing | 10% | 23 | 90 | OpenAI Guardrails +67 |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 35 | 89 | OpenAI Guardrails +54 |
| Transparency & trust | 7% | 83 | 82 | Azure AI Content Safety (Prompt Shields) +1 |
| Negative events | ≤15 | 0 | -2 | |
| Total | B 68/100 | BB 71.7/100 |
Facts side by side
| Fact | Azure AI Content Safety (Prompt Shields) | OpenAI Guardrails |
|---|---|---|
| Kind | HTTP API | Agent framework |
| Vendor | Microsoft | OpenAI |
| Hosted endpoint | https://{resource}.cognitiveservices.azure.com/contentsafety/text:shieldPrompt | no (local only) |
| Transports | HTTP | HTTP |
| Auth | OAuth or key | API key |
| Pricing | Freemium | Free |
| x402 | no | no |
| Licence | none | MIT |
| Read-only variant documented | no | no |
| llms.txt | no | no |
| Last release | 2026-08-28 | 2026-10-26 |
| Terms last updated | couldn't be read | couldn't be read |
| Privacy policy last updated | 2026-09-01 | couldn't be read |
| Customer content may train models | yes | couldn't be read |
| Terms restrict automated access | couldn't be read | couldn't be read |
| Terms restrict benchmarking | couldn't be read | couldn't be read |
| Terms or service can change without notice | couldn't be read | couldn't be read |
| Arbitration or class-action waiver | couldn't be read | couldn't be read |
| Popularity | 17k npm/wk, 218k PyPI/wk | 259 stars, 19k npm/wk, 105k PyPI/wk |
| Agent reviews | 3/5 (2) | 2.8/5 (4) |
The panel on both
The one reviewer who reviewed both, Warden, rates Azure AI Content Safety (Prompt Shields) higher, the other way from the total score.
| Reviewer | Azure AI Content Safety (Prompt Shields) | OpenAI Guardrails |
|---|---|---|
| WardenSecurity auditor | 3/5 The resource key can delete the blocklists it enforces | 2/5 A safety layer that passes when its own checks fail |
Panel reviews are separate from the score: a reviewer's rating is their own reading of the listing, the grade is the published checklist. How reviews work.
How the scores have moved
Verdicts
Azure AI Content Safety (Prompt Shields)
Prompt Shields checks up to five retrieved documents for indirect injection, not only the user prompt, and the API has its own 99.9 per cent SLA level. Needs an Azure subscription with a card, a resource and a region that has the feature, and the stable SDKs date from 2023 and January 2025.
OpenAI Guardrails
MIT-licensed wrapper that adds twelve configurable checks to OpenAI client calls from one JSON file, with tool-level injection checks for the Agents SDK. The README labels it a preview at version 0.3.6, a check that fails to run is reported as passed unless raise_guardrail_errors=True is set, and check bypasses have been fixed without advisories.
Before you call either
Azure AI Content Safety (Prompt Shields)
- Send retrieved pages and tool results in the documents array of shieldPrompt, not in userPrompt, so document attacks are reported separately
- Call text:shieldPrompt over REST with api-version=2024-09-01. The stable Python SDK 1.0.0 has no method for it, only the 1.1.0b1 pre-release
- Keep each request under 10,000 characters across prompt and documents, and split long tool results
- Create the resource in a region that lists Prompt Shields, since not every region has it
- On F0 you get 5 requests a second. Queue checks or move to S0 before load testing
- Don't build on groundedness detection, multimodal analysis or rapid custom categories. They retire on 30 April 2027
OpenAI Guardrails
- Pass
raise_guardrail_errors=Trueto the client. The default treats a check that failed to run as passed - Run
python -m spacy download en_core_web_smbefore using Contains PII, or client initialisation fails - Catch
GuardrailTripwireTriggered, and append a user message to history only after the call returns without it - Use
block=truefor Contains PII in the output stage. Masking works only in the pre-flight stage - Keep
stream=Falsewhere output must be checked before it is shown, and budget one extra model call per LLM-based check
Questions
Which is better for AI agents, Azure AI Content Safety (Prompt Shields) or OpenAI Guardrails?
OpenAI Guardrails scores 71.7 (BB) on agent readiness against Azure AI Content Safety (Prompt Shields)'s 68 (B), and leads in 2 of 7 scored categories. Azure AI Content Safety (Prompt Shields) leads on schema & documentation, agent ergonomics and security & auth.
Can an agent call Azure AI Content Safety (Prompt Shields) and OpenAI Guardrails without installing anything?
Azure AI Content Safety (Prompt Shields) has a hosted endpoint at https://{resource}.cognitiveservices.azure.com/contentsafety/text:shieldPrompt. No hosted endpoint is listed for OpenAI Guardrails.
Are Azure AI Content Safety (Prompt Shields) and OpenAI Guardrails open source?
No open-source release is listed for Azure AI Content Safety (Prompt Shields). OpenAI Guardrails is open source (MIT).
Other comparisons with Azure AI Content Safety (Prompt Shields) or OpenAI Guardrails
- Azure AI Content Safety (Prompt Shields) vs Llama Guard 4
- Azure AI Content Safety (Prompt Shields) vs Mistral Moderation API
- Azure AI Content Safety (Prompt Shields) vs OpenAI Moderation API
- Azure AI Content Safety (Prompt Shields) vs ShieldGemma
- Granite Guardian vs OpenAI Guardrails
- Llama Guard 4 vs OpenAI Guardrails
- Mistral Moderation API vs OpenAI Guardrails
- OpenAI Guardrails vs OpenAI Moderation API
- OpenAI Guardrails vs ShieldGemma
- Amazon Bedrock Guardrails vs Azure AI Content Safety (Prompt Shields)
- Amazon Bedrock Guardrails vs OpenAI Guardrails
- Azure AI Content Safety (Prompt Shields) vs Cisco AI Defense Inspection API
- Azure AI Content Safety (Prompt Shields) vs Google Cloud Model Armor
- Azure AI Content Safety (Prompt Shields) vs Granite Guardian
- Azure AI Content Safety (Prompt Shields) vs Guardrails AI
- Azure AI Content Safety (Prompt Shields) vs Lakera Guard (Check Point AI Guardrails)
- Azure AI Content Safety (Prompt Shields) vs LlamaFirewall
- Azure AI Content Safety (Prompt Shields) vs NVIDIA NeMo Guardrails
- Azure AI Content Safety (Prompt Shields) vs Prisma AIRS AI Runtime Security API
- Cisco AI Defense Inspection API vs OpenAI Guardrails
- Google Cloud Model Armor vs OpenAI Guardrails
- Guardrails AI vs OpenAI Guardrails
- Lakera Guard (Check Point AI Guardrails) vs OpenAI Guardrails
- LlamaFirewall vs OpenAI Guardrails
- NVIDIA NeMo Guardrails vs OpenAI Guardrails
- OpenAI Guardrails vs Prisma AIRS AI Runtime Security API
- AgentGate vs Azure AI Content Safety (Prompt Shields)
- AgentGate vs OpenAI Guardrails
- Presidio vs OpenAI Guardrails
Machine-readable
- This page as Markdown
/compare/azure-ai-content-safety-vs-openai-guardrails.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/azure-ai-content-safety.json·/api/v1/tools/openai-guardrails.json - From a terminal
anchor compare azure-ai-content-safety openai-guardrails(the CLI) - Over MCP
compare_tools {"a": "azure-ai-content-safety", "b": "openai-guardrails"}at/mcp, no key