Setting the file. One moment.
Subchapter 3.3
references/sdk/azure-ai-contentsafety-py.mdMarkdown1 KBView on GitHub
Condensed from azure-ai-contentsafety-py. Full patterns (blocklist management, image analysis, 8-severity mode) in the azure-ai-contentsafety-py plugin skill if installed.
pip install azure-ai-contentsafetyfrom azure.ai.contentsafety import ContentSafetyClient, BlocklistClient
from azure.ai.contentsafety.models import AnalyzeTextOptions, TextCategory
client = ContentSafetyClient(endpoint=endpoint, credential=credential)ContentSafetyClient (analyze) and BlocklistClient (blocklist management)ImageData(content=base64_str)AnalyzeTextOptions(text=..., output_type=AnalyzeTextOutputType.EIGHT_SEVERITY_LEVELS)AnalyzeTextOptions(text=..., blocklist_names=[...], halt_on_blocklist_hit=True)halt_on_blocklist_hit for immediate rejection