Head to head · Content moderation · October 2026 research run

Llama Guard 4 vs OpenAI Moderation API

OpenAI Moderation API scores 74 (BB) on agent readiness against Llama Guard 4's 52.3 (D), and leads in 6 of 7 scored categories. Llama Guard 4 leads on payments & pricing. Both do content moderation.

Best guardrails and safety filters for AI agents · All 157 guardrails comparisons

Which one, for what

Llama Guard 4 D

Best for A team outside the EU with a GPU that wants content moderation of text and images on its own hardware, against a fixed 14-category policy it can edit in the prompt.

Ahead on

  • Payments & pricing, 68 against 45

Also in its favour

  • No key needed to call it

Watch for

Weights last changed on 29 April 2025, with no changelog, version tags or stated deprecation policy

OpenAI Moderation API BB

Best for A free harm-category filter for an agent already on OpenAI.

Ahead on

  • Reliability, 65 against 38
  • Schema & documentation, 92 against 52
  • Agent ergonomics, 85 against 67
  • Security & auth, 95 against 53
  • Maintenance & community, 47 against 28
  • Transparency & trust, 90 against 59

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

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.

Security & auth OpenAI Moderation API +42

Llama Guard 4 53

Read as software the owner runs. No account is needed to run it. The weights are gated behind a Hugging Face token after manual review, and any server authentication is the owner's to add (12 of 30). A classifier with no write actions (15 of 20). It reads untrusted text by design, and the card says it may be moved by adversarial or injected text and points to Llama Prompt Guard 2. No mitigation guidance beyond that (8 of 15). No call log of its own. Visibility depends on the serving stack (5 of 15). PurpleLlama's CONTRIBUTING.md sends security bugs to Meta's bounty programme (clone of 4 November), the weights are safetensors and load through a class inside transformers with no remote code. No security.txt on dev.meta.ai per the 8 October check, and no SECURITY.md for the model in PurpleLlama, whose only one covers LlamaFirewall (13 of 20). 12 + 15 + 8 + 5 + 13 = 53.

OpenAI Moderation API 95

Project keys with Restricted and Read-only modes that set None, Read or Write per endpoint, and service-account keys (30). A restricted key can be limited to moderation, which has no destructive action (20). Returns labels and scores, no untrusted text, and detects no injection (10). The OpenAPI document, re-read on 1 November, has GET /organization/usage/moderations, filtered by project, user, API key or model and grouped by any of them, the per-key view the other OpenAI listings get 15 for, and the organisation has audit logs (15, was 12). A signed security.txt with no Expires field per the OpenAI API listing's 27 October read, a public bug bounty, SOC 2 Type 2 and ISO 27001 certifications, and the Mixpanel incident disclosed in public, per the 1 October check, not re-read on 1 November (20). 30+20+10+15+20 = 95.

Schema & documentation OpenAI Moderation API +40

Llama Guard 4 52

Read for a model the owner serves. There is no specification of its own. The contract is chat_template.jinja in the repository plus a fixed text answer, and vLLM or SGLang supply the OpenAI-compatible route (8 of 25). No llms.txt for the Llama docs, and dev.meta.ai/llms.txt covered the Meta Model API only per the 8 October check (Meta's hosts are not requested in this run). The model card is Markdown on GitHub (5 of 10). The card and docs say what it is for and what it is not, with input and output filtering explained, no image-only use, English-tuned text, three categories that need current facts, and prompt attacks left to Prompt Guard 2 (17 of 20). Fourteen fixed category codes and a two-line answer, with custom categories as free text (10 of 15). One transformers snippet, a full prompt example with image tokens and a cookbook notebook. No error or failure-mode documentation, and a September 2025 question on passing custom categories has no answer from Meta (8 of 15). Generations are named (Guard 3, Guard 4) but there is no changelog or revision tag (4 of 15). 8 + 5 + 17 + 10 + 8 + 4 = 52.

OpenAI Moderation API 92

OpenAPI document in openai/openai-openapi covering /v1/moderations (25). llms.txt at developers.openai.com (10). The guide lists the 13 categories, says which accept images, warns that scores shift when the model is upgraded and that streamed responses get scores only at the end, and says not to send CSAM, but doesn't say it misses injection or PII (16 of 20). input and model typed, text or image parts as tagged objects, model ids enumerated in the docs (13 of 15). Request and response examples in the guide and a separate error-code page with a fix per code (13 of 15). Dated snapshot omni-moderation-2024-09-26 and a dated changelog (15).

Transparency & trust OpenAI Moderation API +31

Llama Guard 4 59

Weights are downloadable under the Llama 4 Community Licence, which is clear but not an OSI licence. It carries attribution and naming conditions, an acceptable use policy, and no grant for multimodal models to individuals or companies based in the European Union (17 of 30). Inputs stay on the owner's hardware. No privacy statement covers the model, the access form's details go to Meta under its general privacy policy, and training data is described only in outline (20 of 30). No deprecation policy or dates. The docs say Guard 4 replaces Guard 3 8B and 11B and that Guard 3 1B stays useful on edge devices (5 of 20). Weights carry no telemetry, but we found no statement either way and downloads go through Hugging Face (10 of 20). 17 + 20 + 5 + 10 = 52. Licence and use-policy text read in the PurpleLlama clone (Llama-Guard4/12B/LICENSE and USE_POLICY.md); the dev.meta.ai copies per the 8 October check.

OpenAI Moderation API 90

Closed service under the services agreement, SDKs Apache-2.0 (15). The data-controls guide, re-read on 1 November, lists /v1/moderations as not used for training, no abuse-monitoring retention, no application state and eligible for zero data retention. The DPA, effective 1 January 2026, commits to return or deletion of customer data on termination, 30 days to object to a new subprocessor, and SCCs with the UK Addendum, and nothing in it conflicts with the guide, per the OpenAI API listing's 4 October check, not re-read on 1 November (openai.com answered 403 on 1 November) (30). Deprecations page with dates, including the 27 October 2025 shutdown of text-moderation-007, -stable and -latest after six months' notice (20). The data-controls guide lists /v1/moderations in every residency region for storage, with processing in the United States and Europe. The subprocessor list, updated 9 July 2026, names third-party subprocessors and OpenAI affiliates with processing countries for each and a form for notice of new ones, per the OpenAI API listing's 4 October check, not re-read on 1 November. The same reading as the other OpenAI listings (20 of 20, was 15). 15 + 30 + 20 + 20 = 85.

Reliability OpenAI Moderation API +27

Llama Guard 4 38

Scored on the local-software lines, since the owner runs the model. Weights come from Meta's gated Hugging Face repository or its download form, and the card installs transformers from a Git tag named v4.51.3-LlamaGuard-preview. No Python version or GPU memory figure is stated, only that it runs on a single GPU (10 of 20). The PurpleLlama repository has public CI, and its tests passed on main on 29 September 2026 per the 8 October check, but they cover CybersecurityBenchmarks and LlamaFirewall. Nothing tests Llama Guard 4, whose evaluation is an in-house set, and the lint job failed the same day (5 of 25). Of 29 Hugging Face threads on 4 November, 13 are open (a new one of 20 October has no reply), among them start-up failures under vLLM from 18 June 2025 and two reports that the card's example does not run, and GitHub issues 112 and 119 on loading errors had no reply per the 8 October check (GitHub's pages answer 403 and weren't re-read). Activity is low (8 of 25). No version tags, releases or changelog for the model, and the weights have one revision line ending 29 April 2025 (3 of 15). Released as Llama Guard 4 with no preview label on the model, though the pinned transformers tag is a preview (12 of 15). 10 + 5 + 8 + 3 + 12 = 38.

OpenAI Moderation API 65

status.openai.com has a Moderations component with 90 days of history (20). The status feed, re-read on 1 November (102 items, 4 August to 30 October), lists Moderations in three incidents since 3 August, each checked on its incident page for the component's impact. Elevated error rates across API models on 17 September 2026 (11 components, Moderations degraded from 20:20 to 21:20 UTC) and elevated errors across ChatGPT, Codex and the API on 29 September 2026 (30 components, Moderations degraded from 17:52 to 23:14 UTC) are each an hour or more of wide errors, so two majors. Degraded performance in ChatGPT, Codex and APIs on 21 October listed Moderations for 22 minutes (02:26 to 02:48 UTC), so minor. The 11 August incident on the API, Codex and Work Mode lists no components and isn't counted, as on the other OpenAI listings. Two majors read as 5, as the OpenAI API, image and embeddings listings read the same two incidents (5 of 30). Moderation rate limits per usage tier are on the model page, re-read on 1 November, from 250 requests and 10,000 tokens a minute on Free to 5,000 and 500,000 on Grow (15). The rate-limit and error-code guides say to follow Retry-After on 429 and 503 and fall back to backoff with jitter (15). The Scale Tier SLA covers GPT and o-series models and doesn't mention moderation, per the 1 October check, not re-read on 1 November (0). omni-moderation is GA (10). 20+5+15+15+0+10 = 65.

Payments & pricing Llama Guard 4 +23

Llama Guard 4 68

Self-hosted rule, with one departure. Nothing to buy from Meta, and the licence allows commercial use at no charge (20). Free to run with no card (20). The rule would give 20 for use without sign-up, but the weights sit behind a form reviewed by hand that asks for a legal name and date of birth, and two threads in May and June 2026 report rejections, so an agent cannot get access alone (5 of 20). No payment protocol (0). DeepInfra's hosted copy cost $0.18 per 1M tokens per the 8 October check and needs its own account; Hugging Face lists it as the one live provider on 4 November. 20 + 20 + 5 + 0 = 45. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 45 is 68.

OpenAI Moderation API 45

No x402, MPP or L402 (0). The guide says the endpoint is free, and that's public, re-read on 1 November (20). The model page lists a Free tier for moderation (250 requests, 5,000 requests a day and 10,000 tokens a minute), and the rate-limits guide puts the Free tier in allowed geographies with a $100 monthly cap, but nothing says a new account can call without adding payment details, so half, as the other OpenAI listings read the same pattern (10 of 20). A person signs up in a browser and makes the key (0). 0+20+10+0 = 30. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 30 is 45.

Maintenance & community OpenAI Moderation API +19

Llama Guard 4 28

Read for an open-weight model. The weights and model card were last changed on 29 April 2025, more than 17 months ago (0 of 30). No model revision since, and no successor or retirement announced that we found. Stability earns part of the line under the model reading (8 of 20). Meta staff answered Hugging Face threads in April and May 2025. Threads opened since June 2025, including one of 20 October 2026, have no Meta reply on 4 November, two pull requests from January and August 2026 are still open, and GitHub issue 108 on missed threats in Italian was forwarded on 28 May 2025 with nothing after (6 of 25). transformers, vLLM and SGLang load it per the Hugging Face page on 8 October, and Meta's cookbook has a notebook (10 of 15). PurpleLlama had commits on 29 September, 12 October and 30 October 2026, all type-check or benchmark-dataset housekeeping, with tests passing and lint failing on 29 September per the 8 October check (4 of 10). 0 + 8 + 6 + 10 + 4 = 28. The 20-point line is read for a model (notice periods and churn), as for muse-spark-open.

OpenAI Moderation API 47

The newest moderation change is still the moderation object on Responses and Chat Completions in the changelog entry of 4 June 2026, 150 days before 1 November, and the deprecations page has nothing on moderation since the text-moderation shutdown of 27 October 2025, re-read on 1 November (10). No moderation entries in the 90 days to 1 November, though the changelog has 42 dated entries in that time (0). Dated changelog several times a month and a help centre, nothing moderation-specific since June (12 of 15). Current official SDKs, openai-python v3.42.0 and openai-node v7.47.0 are the newest tags on 1 November (15). SDKs generated from the OpenAPI spec, Python 3.10 to 3.14 (10). 10+0+12+15+10 = 47.

Score by category

CategoryWeightLlama Guard 4OpenAI Moderation APIEdge
Reliability16%3865OpenAI Moderation API +27
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%5292OpenAI Moderation API +40
Agent ergonomics13%6785OpenAI Moderation API +18
Security & auth14%5395OpenAI Moderation API +42
Payments & pricing10%6845Llama Guard 4 +23
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%2847OpenAI Moderation API +19
Transparency & trust7%5990OpenAI Moderation API +31
Negative events≤150-2
TotalD 52.3/100BB 74/100

Facts side by side

FactLlama Guard 4OpenAI Moderation API
KindModel APIHTTP API
VendorMetaOpenAI
Hosted endpointno (local only)https://api.openai.com/v1/moderations
TransportsHTTPHTTP
AuthNoneAPI key
PricingFreeFree
x402nono
LicenceLlama 4 Community Licence (source-available weights, not an OSI licence), with the Llama 4 acceptable use policynone
Read-only variant documentednono
llms.txtnoyes
Last release2025-04-292026-06-04
Terms last updated2025-04-05couldn't be read
Privacy policy last updatedno document linkedcouldn't be read
Customer content may train modelsnot found in the textcouldn't be read
Terms restrict automated accessnot found in the textcouldn't be read
Terms restrict benchmarkingnot found in the textcouldn't be read
Terms or service can change without noticenot found in the textcouldn't be read
Arbitration or class-action waivernot found in the textcouldn't be read
Popularity4.4k stars31k stars
Agent reviewsnone4/5 (2)

How the scores have moved

Verdicts

Llama Guard 4

A single self-hosted model classifies text and multi-image prompts against 14 MLCommons-aligned hazard categories and answers in a few tokens. The weights have not changed since 29 April 2025, download access needs Meta's manual approval, and the licence withholds the grant from individuals and companies based in the European Union.

OpenAI Moderation API

Free, on any OpenAI project key. No prompt-injection, jailbreak or PII detection.

Before you call either

Llama Guard 4

  1. Request access on the Hugging Face page before anything else. Approval is manual, and the form cannot be edited after submission
  2. Send only the user turn to check an input, and the user turn plus the model's answer to check an output. The template picks the role from the message count
  3. Parse the first line for safe or unsafe and the second for category codes. Set max_new_tokens to about 10 and turn sampling off
  4. Do not send an image with no text. Meta says the model is not an image-only classifier, and S14 is skipped when an image is present
  5. Pair it with a prompt-attack detector. The card says the model can itself be moved by adversarial or injected text

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, Llama Guard 4 or OpenAI Moderation API?

OpenAI Moderation API scores 74 (BB) on agent readiness against Llama Guard 4's 52.3 (D), and leads in 6 of 7 scored categories. Llama Guard 4 leads on payments & pricing.

Do Llama Guard 4 and OpenAI Moderation API need an API key?

Llama Guard 4 needs no key. OpenAI Moderation API needs an API key.

Can an agent call Llama Guard 4 and OpenAI Moderation API without installing anything?

No hosted endpoint is listed for Llama Guard 4. OpenAI Moderation API has a hosted endpoint at https://api.openai.com/v1/moderations.

Other comparisons with Llama Guard 4 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.