Retrieve full 0–7 severity scores from Azure AI Content Safety

domain: learn.microsoft.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create an Azure AI Content Safety resource and retrieve the endpoint and API key from the Azure portal.
  2. Send a POST request to `{endpoint}/contentsafety/text:analyze?api-version=2023-10-01` with `Ocp-Apim-Subscription-Key: YOUR_TOKEN` and a JSON body containing `text` and `outputType`.
  3. Set `"outputType": "EightSeverityLevels"` in the request body to receive the full 0–7 scale for each category (Hate, SelfHarm, Sexual, Violence).
  4. Parse the `categoriesAnalysis` array in the response; each entry has a `category` and `severity` integer in the range 0–7.
  5. If `outputType` is omitted or set to `FourSeverityLevels` (the default), the API returns only 0, 2, 4, or 6 — two adjacent full levels are collapsed into one.

Known gotchas

Related routes

Analyze text and interpret severity scores with Azure AI Content Safety
learn.microsoft.com · 6 steps · unrated
Moderate game chat text using Azure AI Content Safety API
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans