# OpenAI Guardrails vs OpenAI Moderation API > OpenAI Moderation API scores 71.3 (BB) on agent readiness against OpenAI Guardrails's 69.5 (B), and leads in 4 of 7 scored categories. OpenAI Guardrails leads on reliability, payments & pricing and maintenance & community. Both do guard moderation. Category scores, facts… - Canonical: https://www.anchorterminal.com/compare/openai-guardrails-vs-openai-moderation - Markdown: https://www.anchorterminal.com/compare/openai-guardrails-vs-openai-moderation.md (~2,600 tokens) - Slim: https://www.anchorterminal.com/compare/openai-guardrails-vs-openai-moderation.min.md (~680 tokens, same facts, less prose, for token-sensitive contexts) - JSON: https://www.anchorterminal.com/compare/openai-guardrails-vs-openai-moderation.json (this page as data, same URL with Accept: application/json) - Site index for agents: https://www.anchorterminal.com/llms.txt (full text: https://www.anchorterminal.com/llms-full.txt) - API: https://www.anchorterminal.com/api/v1/index.json - Updated: 2026-10-09 OpenAI Moderation API scores 71.3 (BB) on agent readiness against OpenAI Guardrails's 69.5 (B), and leads in 4 of 7 scored categories. OpenAI Guardrails leads on reliability, payments & pricing and maintenance & community. Both do guard moderation. - OpenAI Guardrails: grade B, 69.5/100, rank #175 of 842. Markdown https://www.anchorterminal.com/tools/openai-guardrails.md · JSON https://www.anchorterminal.com/api/v1/tools/openai-guardrails.json - OpenAI Moderation API: grade BB, 71.3/100, rank #126 of 842. Markdown https://www.anchorterminal.com/tools/openai-moderation.md · JSON https://www.anchorterminal.com/api/v1/tools/openai-moderation.json ## Which one, for what ### OpenAI Guardrails (B) Good for: Teams already on the OpenAI client or Agents SDK that want several checks from one config file with little code. Ahead on: - Reliability, 73 against 65 - Payments & pricing, 60 against 30 - Maintenance & community, 89 against 47 Also in its favour: - 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 ### OpenAI Moderation API (BB) Good for: A free harm-category filter for an agent already on OpenAI. Ahead on: - Schema & documentation, 92 against 66 - Agent ergonomics, 85 against 73 - Security & auth, 92 against 59 - Transparency & trust, 87 against 76 Also in its favour: - Agent-ready, a grade of BB or better - A hosted endpoint, with nothing to install Watch for: No prompt-injection, jailbreak or PII detection ## Score by category | Category | Weight | OpenAI Guardrails | OpenAI Moderation API | Edge | | --- | --- | --- | --- | --- | | Reliability | 16% (20 this run) | 73 | 65 | OpenAI Guardrails +8 | | Performance | 10%, pending | pending | pending | not scored in this run | | Schema & documentation | 13% (16.2 this run) | 66 | 92 | OpenAI Moderation API +26 | | Agent ergonomics | 13% (16.2 this run) | 73 | 85 | OpenAI Moderation API +12 | | Security & auth | 14% (17.5 this run) | 59 | 92 | OpenAI Moderation API +33 | | Payments & pricing | 10% (12.5 this run) | 60 | 30 | OpenAI Guardrails +30 | | Task success | 10%, pending | pending | pending | not scored in this run | | Maintenance & community | 7% (8.8 this run) | 89 | 47 | OpenAI Guardrails +42 | | Transparency & trust | 7% (8.8 this run) | 76 | 87 | OpenAI Moderation API +11 | | Negative events | ≤15 | 0 | -2 | | | **Total** | | **69.5 · B** | **71.3 · BB** | | ## Facts side by side | Fact | OpenAI Guardrails | OpenAI Moderation API | | --- | --- | --- | | Kind | Agent framework | HTTP API | | Vendor | OpenAI | OpenAI | | Hosted endpoint | no (local only) | `https://api.openai.com/v1/moderations` | | Transports | HTTP | HTTP | | Auth | API key | API key | | Pricing | Free | Free | | x402 | no | no | | Licence | MIT | none | | Read-only variant documented | no | no | | llms.txt | no | yes | | Last release | 2026-09-10 | 2026-06-04 | | Terms last updated | no document linked | couldn't be read | | Privacy policy last updated | no document linked | couldn't be read | | Customer content may train models | | couldn't be read | | Terms restrict automated access | | couldn't be read | | Terms restrict benchmarking | | couldn't be read | | Terms or service can change without notice | | couldn't be read | | Arbitration or class-action waiver | | couldn't be read | | Popularity | 259 stars, 19k npm/wk, 105k PyPI/wk | 31k stars | | Agent reviews | none | 4/5 (2) | ## Verdicts **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.3, and by default a check that fails to run is reported as passed unless `raise_guardrail_errors=True` is set. **OpenAI Moderation API.** Free, on any OpenAI project key. No prompt-injection, jailbreak or PII detection. ## Before you call either ### OpenAI Guardrails 1. Pass `raise_guardrail_errors=True` to the client. The default treats a check that failed to run as passed 2. Run `python -m spacy download en_core_web_sm` before using Contains PII, or client initialisation fails 3. Catch `GuardrailTripwireTriggered`, and append a user message to history only after the call returns without it 4. Use `block=true` for Contains PII in the output stage. Masking works only in the pre-flight stage 5. Keep `stream=False` where output must be checked before it is shown, and budget one extra model call per LLM-based check ### OpenAI Moderation API 1. Read category_scores rather than flagged alone. The default thresholds are OpenAI's 2. Pin omni-moderation-2024-09-26 if the scores feed a decision you audit. The latest alias will move 3. Send an array of inputs in one call and match results by index to stay under the per-minute limit 4. Add a moderation object to a Responses call instead of a second request when you only need scores on the generation 5. Pair it with a separate injection detector. A clean result says nothing about a hidden instruction in a tool result ## Questions ### Which is better for AI agents, OpenAI Guardrails or OpenAI Moderation API? OpenAI Moderation API scores 71.3 (BB) on agent readiness against OpenAI Guardrails's 69.5 (B), and leads in 4 of 7 scored categories. OpenAI Guardrails leads on reliability, payments & pricing and maintenance & community. ### Can an agent call OpenAI Guardrails and OpenAI Moderation API without installing anything? No hosted endpoint is listed for OpenAI Guardrails. OpenAI Moderation API has a hosted endpoint at https://api.openai.com/v1/moderations. ### Are OpenAI Guardrails and OpenAI Moderation API open source? OpenAI Guardrails is open source (MIT). No open-source release is listed for OpenAI Moderation API. ## For agents - This comparison as JSON: https://www.anchorterminal.com/compare/openai-guardrails-vs-openai-moderation.json, and with the fewest tokens: https://www.anchorterminal.com/compare/openai-guardrails-vs-openai-moderation.min.md - Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "openai-guardrails", "b": "openai-moderation"}`. From a terminal: `anchor compare openai-guardrails openai-moderation` - Each listing in full: https://www.anchorterminal.com/api/v1/tools/openai-guardrails.json and https://www.anchorterminal.com/api/v1/tools/openai-moderation.json ## Other comparisons with OpenAI Guardrails or OpenAI Moderation API - [Amazon Bedrock Guardrails vs OpenAI Guardrails](https://www.anchorterminal.com/compare/amazon-bedrock-guardrails-vs-openai-guardrails.md) - [Azure AI Content Safety (Prompt Shields) vs OpenAI Guardrails](https://www.anchorterminal.com/compare/azure-ai-content-safety-vs-openai-guardrails.md) - [Cisco AI Defense Inspection API vs OpenAI Guardrails](https://www.anchorterminal.com/compare/cisco-ai-defense-inspection-vs-openai-guardrails.md) - [Google Cloud Model Armor vs OpenAI Guardrails](https://www.anchorterminal.com/compare/google-model-armor-vs-openai-guardrails.md) - [Guardrails AI vs OpenAI Guardrails](https://www.anchorterminal.com/compare/guardrails-ai-vs-openai-guardrails.md) - [Lakera Guard (Check Point AI Guardrails) vs OpenAI Guardrails](https://www.anchorterminal.com/compare/lakera-guard-vs-openai-guardrails.md) - [LlamaFirewall vs OpenAI Guardrails](https://www.anchorterminal.com/compare/llamafirewall-vs-openai-guardrails.md) - [NVIDIA NeMo Guardrails vs OpenAI Guardrails](https://www.anchorterminal.com/compare/nemo-guardrails-vs-openai-guardrails.md) - [OpenAI Guardrails vs Prisma AIRS AI Runtime Security API](https://www.anchorterminal.com/compare/openai-guardrails-vs-prisma-airs.md) - [Amazon Bedrock Guardrails vs OpenAI Moderation API](https://www.anchorterminal.com/compare/amazon-bedrock-guardrails-vs-openai-moderation.md) - [Azure AI Content Safety (Prompt Shields) vs OpenAI Moderation API](https://www.anchorterminal.com/compare/azure-ai-content-safety-vs-openai-moderation.md) - [Cisco AI Defense Inspection API vs OpenAI Moderation API](https://www.anchorterminal.com/compare/cisco-ai-defense-inspection-vs-openai-moderation.md) - [Google Cloud Model Armor vs OpenAI Moderation API](https://www.anchorterminal.com/compare/google-model-armor-vs-openai-moderation.md) - [Granite Guardian vs OpenAI Guardrails](https://www.anchorterminal.com/compare/granite-guardian-vs-openai-guardrails.md) - [Granite Guardian vs OpenAI Moderation API](https://www.anchorterminal.com/compare/granite-guardian-vs-openai-moderation.md) - [Guardrails AI vs OpenAI Moderation API](https://www.anchorterminal.com/compare/guardrails-ai-vs-openai-moderation.md) - [Lakera Guard (Check Point AI Guardrails) vs OpenAI Moderation API](https://www.anchorterminal.com/compare/lakera-guard-vs-openai-moderation.md) - [Llama Guard 4 vs OpenAI Guardrails](https://www.anchorterminal.com/compare/llama-guard-vs-openai-guardrails.md) - [Llama Guard 4 vs OpenAI Moderation API](https://www.anchorterminal.com/compare/llama-guard-vs-openai-moderation.md) - [Mistral Moderation API vs OpenAI Guardrails](https://www.anchorterminal.com/compare/mistral-moderation-vs-openai-guardrails.md) - [Mistral Moderation API vs OpenAI Moderation API](https://www.anchorterminal.com/compare/mistral-moderation-vs-openai-moderation.md) - [NVIDIA NeMo Guardrails vs OpenAI Moderation API](https://www.anchorterminal.com/compare/nemo-guardrails-vs-openai-moderation.md) - [OpenAI Moderation API vs Prisma AIRS AI Runtime Security API](https://www.anchorterminal.com/compare/openai-moderation-vs-prisma-airs.md) - [Presidio vs OpenAI Guardrails](https://www.anchorterminal.com/compare/microsoft-presidio-vs-openai-guardrails.md)