azure-ai-contentsafety-py

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

2.9k|323|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/microsoft/skills --skill azure-ai-contentsafety-py-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: azure-ai-contentsafety-py
Source: https://github.com/microsoft/skills/tree/main/.github/plugins/azure-sdk-python/skills/azure-ai-contentsafety-py
Command: npx skills add https://github.com/microsoft/skills --skill azure-ai-contentsafety-py-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect and classify harmful content in text and images within Python applications, enabling safe user interactions and compliant content policies.

Core Features & Use Cases

  • Text analysis: detect hate, self-harm, sexual content, and violence with severity levels.
  • Image analysis: evaluate safety of uploaded media across categories.
  • Blocklist management: maintain and apply custom term lists to enforce policy.

Quick Start

Install the azure-ai-contentsafety package and start analyzing content in your Python application.

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?

To detect harmful content in text and images within Python, use the Azure Content Safety SDK to analyze user-generated content for hate, self-harm, sexual content, and violence across chat apps and forums.

What do I need to configure before analyzing images for safety in Python?

Analyzing image safety requires an Azure endpoint and key or DefaultAzureCredential. You must install the azure-ai-contentsafety package to start evaluating uploaded media across safety categories in your Python application.

Can I enforce custom content moderation policies for user-generated text?

Yes, you can enforce custom content moderation policies using blocklist management. This feature allows you to maintain and apply custom term lists to block specific text within your enterprise workflows or social platforms.

How does text analysis classify harmful content severity levels?

Text analysis classifies harmful content by evaluating text for hate, self-harm, sexual content, and violence, assigning severity levels to each category to help you enforce compliant content policies.

What is the best way to moderate content in chat applications and forums?

The best way to moderate content in chat applications and forums is integrating the Azure Content Safety SDK in Python to automatically detect and classify harmful text and images, ensuring safe user interactions.

Does Azure Content Safety work with DefaultAzureCredential for authentication?

Yes, Azure Content Safety works with DefaultAzureCredential as well as standard Azure endpoint and key authentication, allowing flexible access management when applying text moderation and blocklist features in Python.