Home › Studies › AI-103 › Computer Vision › Responsible AI for Visual Content

Responsible AI for Visual Content

image harm categories · severity and blocking levels · Analyze image · Prompt Shields · provenance and watermarks · custom categories

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Classify unsafe images

The content filtering system classifies harm into four categories for text and image: hate and fairness, sexual, violence, self-harm. It uses neural multiclass classification models.

Content typeSeverity values returned
Image0, 2, 4, 6 (trimmed scale)
Image with text (multimodal)Full 0 to 7 scale; can be mapped to 0, 2, 4, 6 if you specify
Safe levelAnnotated, never blocked, not configurable
Blocking levelBlocks
OffNothing (annotations can still be returned); modified Guardrails on output need approval
LowHigh severity only (least restrictive)
Medium (default)Medium and high severity
HighLow, medium and high severity (most restrictive)

Analyze image API

Analyze image scans images for sexual content, violence, hate and self-harm with multiple severity levels. Python: azure-ai-contentsafety.

  1. client = ContentSafetyClient(endpoint, AzureKeyCredential(key))
  2. request = AnalyzeImageOptions(image=ImageData(content=file.read()))
  3. response = client.analyze_image(request)
  4. Read response.categories_analysis: each item has a category (ImageCategory) and a severity.

Indirect prompt injection and Prompt Shields

AttackWhere it comes fromDefault in Foundry
User prompt attackMalicious user input that tries to bypass system instructions (field userPrompt)Enabled
Document attack (indirect)Hidden instructions in documents, emails or web pages (field documents)Off; must be enabled

Learn describes Prompt Shields for text. It gives no steps for reading text inside image pixels with Prompt Shields. Its retirement notice for Analyze Multimodal points to OCR text extraction (Document Intelligence or Content Understanding) followed by Analyze Text for extracted text.

Visual policy rules: provenance, symbols and custom detection

Policy needLearn-backed toolKey facts
Is this media AI-made or credentialed?Content Provenance Detection (Detect API)Finds C2PA Content Credentials and invisible watermarks in image, audio and video; asynchronous; types Watermark or C2PA
Credentials on generated imagesDefault image generation policyA Content credentials row applies to completions
Prohibited symbols and hate imageryImage harm categoriesImage severity examples: Low lists Nazi symbolism, the confederate flag and Ku Klux Klan symbolism; Medium lists the Nazi flag and confederate flag; High lists glorified Nazi, Confederate flag and Ku Klux Klan symbolism
Protected art and studio charactersDefault image generation mitigationModel-level, not configurable through guardrail settings
New harmful image trendCustom categories (rapid)Define an incident from a few examples; image flow: create incident, add samples, deploy, detect; retires April 30, 2027
Inappropriate contentHarm categories and blocking levelsPick the blocking level per category

Learn pages in the cache do not describe an app feature to stamp visible watermarks on generated images or a brand-usage (logo or colour) checker. Do not assume Foundry offers one.

CLI and PowerShell

TaskAzure CLIPowerShell
Analyze an image (Python, azure-ai-contentsafety)response = client.analyze_image(request)-
Install the Content Safety Python librarypython -m pip install azure-ai-contentsafety-
Submit a provenance detection job (REST)-Invoke-WebRequest -Method POST "$endpoint/contentsafety/provenance:detect?api-version=$version"

Exam Tips

Tick each tip once you can answer it without looking.

“Harm categories for images” → Hate and fairness, sexual, violence, self-harm. Trap: User prompt attacks (jailbreak) and protected material are separate controls.

“Severity values from the image classifier” → 0, 2, 4, 6. Trap: The full 0 to 7 scale belongs to image with text (multimodal).

“Default blocking level for the four core harms” → Medium: blocks medium and high severity. Trap: Low severity passes at Medium.

“Block even low-severity imagery” → Set the blocking level to High (most restrictive). Trap: The Low level blocks high severity only.

“Safe-level content” → Annotated, never blocked, not configurable. Trap: A Safe result does not prove other risks are absent.

“Python call to moderate an image” → request = AnalyzeImageOptions(image=ImageData(content=file.read())), then response = client.analyze_image(request); read categories_analysis. Trap: ImageCategory is for reading results, not building the request.

“Chat with an image and a request-level guardrail” → Not available for image input: the default guardrail is used. Trap: The usual request-level override does not apply here.

“Moderating an animated image” → The service analyzes the first frame. Trap: It does not score every frame.

“Retiring Analyze Multimodal (April 30, 2027): what next?” → Analyze Image + OCR (Document Intelligence or Content Understanding) + Analyze Text. Trap: Custom categories (rapid) retires on the same date.

“Hidden instructions in an email or web page the assistant reads” → Document attack: enable document attack detection (off by default). Trap: User prompt attack detection is the one that is on by default.

“Which field holds third-party text in the standalone Prompt Shields API?” → documents (up to five); the user's question goes in userPrompt. Trap: Swapping the fields skips the document attack check.

“Spotlighting” → Preview; off by default; Chat Completions only; base-64 encodes documents to mark them lower trust. Trap: It adds document tokens because of base-64 encoding, and large documents can exceed input size limits.

“Prompt Shields flagged an attack but the app still used the document” → The standalone API does not block; your application must act on attackDetected. Trap: Foundry blocking is a separate setting.

“Is this image AI-generated or credentialed (C2PA, watermark)?” → Content Provenance Detection Detect API (asynchronous: submit, then poll). Trap: Analyze image scores harm; it does not read provenance.

“Detect API says NoProvenanceDetected” → No recognized markers were found; it does not prove the file is inauthentic. Trap: Do not read it as a fake or edited verdict.

“React fast to a new harmful image trend with a few samples” → Custom categories (rapid): create incident, add samples, deploy, detect (retires April 30, 2027). Trap: It is preview and retiring; plan the migration.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Multimodal UnderstandingComputer Vision overview →