Moderate game chat text using Azure AI Content Safety API

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 in the Azure Portal and retrieve the endpoint URL and subscription key from the Resource Management section
  2. POST to {endpoint}/contentsafety/text:analyze?api-version=2024-09-15-preview with the Ocp-Apim-Subscription-Key header and a JSON body containing the text field and optional categories array (Hate, SelfHarm, Sexual, Violence)
  3. Parse the categoriesAnalysis array in the response; each category includes a severity score on a 0–6 scale with even values (0, 2, 4, 6) as the primary severity levels
  4. Apply thresholds appropriate to your game's rating and audience — for teen-rated games a severity of 2 or above in violence may warrant a block, while adult titles may set higher thresholds
  5. For real-time chat moderation, call the API synchronously per message; the service is optimized for low-latency synchronous use cases

Known gotchas

Related routes

Analyze text and interpret severity scores with Azure AI Content Safety
learn.microsoft.com · 6 steps · unrated
Integrate Hive Text Moderation API for real-time game chat filtering
docs.thehive.ai · 5 steps · unrated
Integrate Modulate ToxMod for real-time voice chat moderation in a game
modulate.ai · 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