Create an Azure AI Content Safety resource and retrieve the endpoint and API key from the Azure portal.
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`.
Set `"outputType": "EightSeverityLevels"` in the request body to receive the full 0–7 scale for each category (Hate, SelfHarm, Sexual, Violence).
Parse the `categoriesAnalysis` array in the response; each entry has a `category` and `severity` integer in the range 0–7.
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
The default output uses `FourSeverityLevels` (values 0, 2, 4, 6 only); you must explicitly request `EightSeverityLevels` to get the full 0–7 granularity.
A severity of 0 does not mean content is guaranteed safe — it means the model assigned the lowest detectable risk level; implement additional application logic for zero-tolerance use cases.
Rate limits and pricing are per 1,000 text records; high-frequency scanning should use batching and monitor throttling (HTTP 429) responses.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp