azure-ai-contentsafety-py

Detect harmful content in text and images using Azure Content Safety APIs.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-ai-contentsafety-py-davidrrowley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-ai-contentsafety-py
Source: https://github.com/davidrrowley/CortexYouV3/tree/main/.agents/skills/azure-ai-contentsafety-py
Command: npx skills add https://github.com/davidrrowley/CortexYouV3 --skill azure-ai-contentsafety-py-davidrrowley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides programmatic detection and moderation of harmful or policy-violating content in text and images to prevent unsafe outputs from user-generated or AI-generated sources and reduce moderation burden.

Core Features & Use Cases

  • Multi-category detection: Classifies content across hate, sexual content, violence, and self-harm categories with severity scoring.
  • Text and image analysis: Supports both text analysis and image analysis including blob URLs and raw image bytes.
  • Blocklist management & enforcement: Create and manage custom blocklists and optionally halt processing on blocklist hits for immediate rejection.
  • Use Case: Pre-moderate AI-generated assistant replies and user uploads to automatically flag or reject content before display.

Quick Start

Analyze the provided text for hate, sexual, violence, and self-harm categories and return severity scores and any blocklist matches.

Frequently Asked Questions about azure-ai-contentsafety-py

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect harmful content in text and images using Python?

You can detect harmful content in text and images by sending data to Azure Content Safety APIs, which return severity scores across hate, sexual, violence, and self-harm categories for programmatic moderation.

Can I analyze both raw image bytes and blob URLs for content moderation?

Azure Content Safety image analysis supports both raw image bytes and blob URLs, allowing you to evaluate user uploads or cloud-stored media for policy violations within your moderation pipeline.

How do I create custom blocklists for automated content filtering?

Custom blocklist management lets you define specific terms or patterns to flag, and you can optionally configure your pipeline to immediately reject content upon a blocklist hit before display.

Does Azure Content Safety support Entra ID authentication or only API keys?

Azure Content Safety supports both API key and Entra ID authentication, allowing you to secure requests against your endpoint using either method depending on your application's security requirements.

What is the best way to pre-moderate AI-generated text outputs?

Pre-moderating AI-generated text involves passing assistant replies through Azure Content Safety APIs to automatically classify severity across multiple categories and flag or reject unsafe outputs before display.

How does severity classification work for user-generated content?

Severity classification evaluates user-generated content by assigning scores across hate, sexual, violence, and self-harm categories, enabling automated enforcement based on your configured severity thresholds.