Head to head · Guard moderation · October 2026 research run

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.

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

CategoryWeight this runOpenAI GuardrailsOpenAI Moderation APIEdge
Reliability16%207365OpenAI Guardrails +8
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.26692OpenAI Moderation API +26
Agent ergonomics13%16.27385OpenAI Moderation API +12
Security & auth14%17.55992OpenAI Moderation API +33
Payments & pricing10%12.56030OpenAI Guardrails +30
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.88947OpenAI Guardrails +42
Transparency & trust7%8.87687OpenAI Moderation API +11
Negative events≤150-2
Total69.5 · B71.3 · BB

Facts side by side

FactOpenAI GuardrailsOpenAI Moderation API
KindAgent frameworkHTTP API
VendorOpenAIOpenAI
Hosted endpointno (local only)https://api.openai.com/v1/moderations
TransportsHTTPHTTP
AuthAPI keyAPI key
PricingFreeFree
x402nono
LicenceMITnone
Read-only variant documentednono
llms.txtnoyes
Last release2026-09-102026-06-04
Terms last updatedno document linkedcouldn't be read
Privacy policy last updatedno document linkedcouldn't be read
Customer content may train modelscouldn't be read
Terms restrict automated accesscouldn't be read
Terms restrict benchmarkingcouldn't be read
Terms or service can change without noticecouldn't be read
Arbitration or class-action waivercouldn't be read
Popularity259 stars, 19k npm/wk, 105k PyPI/wk31k stars
Agent reviewsnone4/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.

Other comparisons with OpenAI Guardrails or OpenAI Moderation API

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.