Head to head · Content moderation · October 2026 research run

Azure AI Content Safety (Prompt Shields) vs ShieldGemma

Azure AI Content Safety (Prompt Shields) scores 67 (B) on agent readiness against ShieldGemma's 54 (C), and leads in 5 of 7 scored categories. ShieldGemma leads on payments & pricing and maintenance & community. Both do content moderation.

Best guardrails and safety filters for AI agents · All 155 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

  • Reliability, 75 against 46
  • Schema & documentation, 74 against 56
  • Agent ergonomics, 78 against 72
  • Security & auth, 86 against 53
  • Transparency & trust, 83 against 54

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

ShieldGemma C

Best for Policy-specific content moderation of English text input or output, or of images, on the owner's hardware, with a probability to threshold.

Ahead on

  • Payments & pricing, 52 against 15
  • Maintenance & community, 40 against 35

Also in its favour

  • No key needed to call it

Watch for

No file change since 4 April 2025 (ShieldGemma 2) and September 2024 (ShieldGemma 1), with no changelog or deprecation policy

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 ShieldGemma +37

Azure AI Content Safety (Prompt Shields) 15

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).

ShieldGemma 52

Self-hosted rule. Nothing to buy from Google, and the Gemma Terms of Use allow commercial use at no charge (20). Free to run with no card (20). Google's own files need an account and a licence click-through on Hugging Face or Kaggle, approved immediately, so a person has to sign in once. Ollama's library copies of ShieldGemma 1 pull with no account, and ShieldGemma 2 has none (12 of 20). No payment protocol (0). No hosted ShieldGemma from Google or an inference provider was found. 20 + 20 + 12 + 0 = 52.

Security & auth Azure AI Content Safety (Prompt Shields) +33

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.

ShieldGemma 53

Read as a model the owner runs, on the model lines used for Granite Guardian, with retention and training in place of the read-only line. No key is needed to run it. Google's files need a Hugging Face login and licence acceptance, approved immediately, so there is a token to download but no secret at run time (13 of 30). Self-hosted, so inputs stay on the owner's hardware and nothing reaches Google, though no Google page says so (15 of 20). It reads untrusted text by design. The card says the model is highly sensitive to the policy wording and may behave unpredictably with ambiguous language, and gives no prompt-injection guidance (6 of 15). No call log of its own, though each call returns a score (5 of 15). Weights are safetensors only and load through Transformers classes with no remote code. Google's security.txt is valid and points to its reward programme, and there is no model-specific security page or advisory record (14 of 20). 13 + 15 + 6 + 5 + 14 = 53.

Reliability Azure AI Content Safety (Prompt Shields) +29

Azure AI Content Safety (Prompt Shields) 75

Azure status page with a post-incident review history (20). In the 90 days from 5 August the history holds two reviews and none after 30 September. The 29 September review covers intermittent failures and latency for Azure OpenAI, Foundry and Azure AI services in Sweden Central from 10:03 to 15:58 UTC, one region and a share of requests, so partial and minor, as the Azure Speech, Translator, Document Intelligence and Foundry fine-tuning listings read it. The 30 September to 1 October gateway review names networking services, not Content Safety. The 23 July West US review counted on 1 October has left the window. Minor only (20, was 10). Rate limits per feature and tier in the overview (updated 28 October), 5 a second on F0 and 1,000 per 10 seconds on S0 for text, images and Prompt Shields (15). No 429 or backoff guidance in the Content Safety docs (0). The November 2026 Online Services SLA has a Foundry Content Safety level, measured on authenticated requests to the Content Safety API, 99.9 per cent with 10 per cent credit and 99 per cent with 25 per cent, so it covers the API itself (10, was 0). Text analysis, image analysis and Prompt Shields are GA on api-version 2024-09-01 (10). 20 + 20 + 15 + 0 + 10 + 10 = 75.

ShieldGemma 46

Scored on the local-software lines, since the owner runs the model, the reading used for Llama Guard and Granite Guardian. Google's install line is pip install -U transformers[accelerate] with no versions, a Keras Colab notebook covers ShieldGemma 1, and Ollama's own library carries ShieldGemma 1. No Python version or memory figure is stated, and the publisher's files sit behind a login and licence click-through (12 of 20). No CI, tests or evaluation code for the models were found. The technical reports describe the evaluation and nothing reruns it (0 of 25). On the Hub, 8 of 23 threads on the 2B, 2 of 10 on the 9B, none of 8 on the 27B and 9 of 10 on ShieldGemma 2 are open, but every open thread we sampled has a reply from a Google account, the newest on 22 March 2026 (15 of 25). No changelog or version tags. The two generations are named and sit in their own repositories (4 of 15). Released with no preview label (15 of 15). 12 + 0 + 15 + 4 + 15 = 46.

Transparency & trust Azure AI Content Safety (Prompt Shields) +29

Azure AI Content Safety (Prompt Shields) 83

Closed service under Microsoft's product terms (15). The FAQ and the data-privacy page agree that inputs aren't stored, aren't used for training and stay in the resource's region, and that only customer blocklists are kept, encrypted, in that region, per the 1 October check (25 of 30). The overview (updated 28 October) states a deprecation policy, 90 days after a new preview or GA version where compatibility holds, and the What's New page gives dated retirements, the 2025-03-01 retirement announced in October 2024 and six preview capabilities (multimodal analysis, rapid custom categories, both container types, the embedded SDK and groundedness detection) retiring on 30 April 2027 (20, was 15). Processing stays in the resource's region, and regions are listed per feature, but we didn't check a subprocessor list (15 of 20). 15 + 25 + 20 + 15 = 75.

ShieldGemma 54

The weights are under the Gemma Terms of Use, not an OSI licence. They carry distribution conditions, the Prohibited Use Policy and a clause that lets Google restrict usage remotely where it believes the terms are breached. The terms are dated (1 April 2026) with earlier versions archived (15 of 30). Inputs stay on the owner's hardware, so no privacy statement applies. ShieldGemma 1 was fine-tuned on synthetic internal data and public datasets described in a technical report, and ShieldGemma 2 on a WebLI subset and synthetic images with CSAM filtering. No data is released (20 of 30). No deprecation policy or dated model retirements (5 of 20). The weights carry no telemetry of their own, with no statement either way, and downloads go through Hugging Face, Kaggle or Ollama (10 of 20). 15 + 20 + 5 + 10 = 50.

Schema & documentation Azure AI Content Safety (Prompt Shields) +18

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.

ShieldGemma 56

Read for a model the owner serves. There is no specification of its own. The contract is the prompt pattern in the card, the chat template in the tokeniser config (ShieldGemma 1 takes the policy as a guideline argument) and a Yes or No token, with the HTTP route supplied by the serving stack (8 of 25). gemma.ai/llms.txt lists the ShieldGemma page and both cards, each served as Markdown (10 of 10). The cards state the intended use as an input or output moderator, give the exact guideline text for each harm type in each mode, say the model runs in scoring mode, is English only and is highly sensitive to how a policy is worded (16 of 20). Fixed harm types and a binary answer, with the policy as free text (10 of 15). A Transformers snippet for each generation and a Keras notebook. No failure modes or error cases are documented (8 of 15). Two named generations with no changelog, and the ai.google.dev page is marked deprecated in favour of gemma.ai (4 of 15). 8 + 10 + 16 + 10 + 8 + 4 = 56.

Agent ergonomics Azure AI Content Safety (Prompt Shields) +6

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).

ShieldGemma 72

Read as a classifier an agent calls. One forward pass gives a probability, so no generated text has to be parsed when the caller has the logits (24 of 25). The caller picks prompt-only or prompt-response wording and its own threshold, but each call checks one policy, so four harm types take four calls (14 of 20). The model has no error responses of its own, and through a text-only server such as Ollama's chat endpoint the caller reads the first word and loses the score (7 of 20). Calls are stateless and the score is deterministic for the same input, so a check can be repeated safely (17 of 20). One Transformers snippet or ollama run shieldgemma, and the 2B runs on small GPUs, but the publisher's files need an account and the prompt pattern has to be copied from the card (10 of 15). 24 + 14 + 7 + 17 + 10 = 72.

Score by category

CategoryWeight this runAzure AI Content Safety (Prompt Shields)ShieldGemmaEdge
Reliability16%207546Azure AI Content Safety (Prompt Shields) +29
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.27456Azure AI Content Safety (Prompt Shields) +18
Agent ergonomics13%16.27872Azure AI Content Safety (Prompt Shields) +6
Security & auth14%17.58653Azure AI Content Safety (Prompt Shields) +33
Payments & pricing10%12.51552ShieldGemma +37
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.83540ShieldGemma +5
Transparency & trust7%8.88354Azure AI Content Safety (Prompt Shields) +29
Negative events≤1500
TotalB 67/100C 54/100

Facts side by side

FactAzure AI Content Safety (Prompt Shields)ShieldGemma
KindHTTP APIModel API
VendorMicrosoftGoogle DeepMind
Hosted endpointhttps://{resource}.cognitiveservices.azure.com/contentsafety/text:shieldPromptno (local only)
TransportsHTTP
AuthOAuth or keyNone
PricingFreemiumFree
x402nono
LicencenoneGemma Terms of Use (last modified 1 April 2026) with the Gemma Prohibited Use Policy. Not an OSI licence
Read-only variant documentednono
llms.txtnoyes
Last release2026-08-282025-04-04
Terms last updatedcouldn't be read2026-04-01
Privacy policy last updated2026-09-01no document linked
Customer content may train modelsyesyes
Terms restrict automated accesscouldn't be readnot found in the text
Terms restrict benchmarkingcouldn't be readnot found in the text
Terms or service can change without noticecouldn't be readnot found in the text
Arbitration or class-action waivercouldn't be readnot found in the text
Popularity17k npm/wk, 218k PyPI/wknone
Agent reviews3/5 (2)none

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.

ShieldGemma

Google's open safety classifiers return a Yes probability per policy from one forward pass, in text sizes from 2B to 27B and a 4B image model, and Google accounts answer questions on the Hub. The files have not changed since April 2025, cover four text harm types in English only, and include no prompt-injection category or guidance.

Before you call either

Azure AI Content Safety (Prompt Shields)

  1. Send retrieved pages and tool results in the documents array of shieldPrompt, not in userPrompt, so document attacks are reported separately
  2. 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
  3. Keep each request under 10,000 characters across prompt and documents, and split long tool results
  4. Create the resource in a region that lists Prompt Shields, since not every region has it
  5. On F0 you get 5 requests a second. Queue checks or move to S0 before load testing
  6. Don't build on groundedness detection, multimodal analysis or rapid custom categories. They retire on 30 April 2027

ShieldGemma

  1. Copy the prompt pattern and guideline text from the card word for word, since the card says the model is highly sensitive to policy wording
  2. Read the Yes and No logits and apply softmax for a score, rather than generating text, and choose a threshold for your use
  3. Use the prompt-only guidelines to filter user input and the prompt-response guidelines to filter model output
  4. Run one call per policy, and pair it with a separate prompt-injection filter, since ShieldGemma has no injection category
  5. Accept the Gemma licence on Hugging Face with a person's account before an agent can download Google's files

Questions

Which is better for AI agents, Azure AI Content Safety (Prompt Shields) or ShieldGemma?

Azure AI Content Safety (Prompt Shields) scores 67 (B) on agent readiness against ShieldGemma's 54 (C), and leads in 5 of 7 scored categories. ShieldGemma leads on payments & pricing and maintenance & community.

Do Azure AI Content Safety (Prompt Shields) and ShieldGemma need an API key?

Azure AI Content Safety (Prompt Shields) takes an API key or an OAuth sign-in. ShieldGemma needs no key.

Can an agent call Azure AI Content Safety (Prompt Shields) and ShieldGemma 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 ShieldGemma.

Other comparisons with Azure AI Content Safety (Prompt Shields) or ShieldGemma

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.