Study guide
6.5 Image Generation (gpt-image; DALL-E 3 Retired)
Azure AI Engineer Associate AI-102
Track your progress as you read
Finished sections get a check mark.
1 Introduction
About the Azure AI Engineer Associate (AI-102) Exam Study Strategies and Exam Tips for the AI-102
2 Domain 1: Plan and Manage an Azure AI Solution (20-25%)
1.1 Azure AI Services Overview and Selection 1.2 Resource Provisioning and Configuration 1.3 Security and Access Management 1.4 Responsible AI Principles and Implementation 1.5 Azure AI Solution Architecture Patterns
3 Content Safety and Moderation (within Plan and Manage, Domain 1)
2.1 Azure AI Content Safety Overview 2.2 Prompt Shields and Adversarial Attack Detection 2.3 Text and Image Moderation Implementation 2.4 Content Filtering in Azure OpenAI Service
4 Domain 4: Implement Computer Vision Solutions (10-15%)
3.1 Azure AI Vision — Image Analysis 4.0 3.2 Azure AI Face Service 3.3 Azure AI Custom Vision 3.4 Optical Character Recognition (OCR) 3.5 Video Analysis and the Retired Spatial Analysis
5 Domain 5: Implement Natural Language Processing Solutions (15-20%)
4.1 Azure AI Language — Text Analytics Features 4.2 Conversational Language Understanding (CLU) 4.3 Custom Text Classification and Custom NER 4.4 Azure AI Speech Services 4.5 Azure AI Translator Service 4.6 Question Answering and Conversational AI
6 Domain 6: Implement Knowledge Mining and Information Extraction Solutions (15-20%)
5.1 Azure AI Search — Fundamentals and Architecture 5.2 AI Enrichment with Skillsets 5.3 Azure AI Document Intelligence
7 Domain 2: Implement Generative AI Solutions (15-20%)
6.1 Azure OpenAI Service — Models and Deployment 6.2 Chat Completions API and Prompt Engineering 6.3 Embeddings and Vector Search for RAG 6.4 Fine-Tuning and Model Customization 6.5 Image Generation (gpt-image; DALL-E 3 Retired) 6.6 RAG After On Your Data, and AI Agents
8 Domain 3: Implement an Agentic Solution (5-10%)
3.1 Agentic Solutions: Foundry Agent Service and the Microsoft Agent Framework
9 Exam Review: Cross-Domain Topics and Advanced Practice
7.1 Service Comparison and Selection Guide 7.2 SDK and REST API Patterns 7.3 Responsible AI Across All Domains 7.4 End-to-End Solution Architectures 7.5 Exam Day Quick Reference
6.5 Image Generation (gpt-image; DALL-E 3 Retired)
Key Takeaways Explain This Topic AI
Azure OpenAI generates images with the gpt-image series through the Images API; dall-e-3 was retired on March 4, 2026, and dall-e-2 on January 27, 2025.
GPT-Image-1 supports sizes 1024x1024, 1024x1536, and 1536x1024, quality low, medium, or high (default high), and 1-10 images per request with the n parameter.
GPT-Image-1, GPT-Image-1-Mini, GPT-Image-1.5 and GPT-Image-2 return images only as base64 (b64_json), not URLs, and gpt-image models support editing (inpainting) with an input image, a mask, and a prompt.
Content filtering runs on BOTH the input prompt and the generated image, using the same harm categories (hate, sexual, violence, self-harm) as text.
A blocked prompt returns the error code contentFilter, and a blocked output returns "Generated image was filtered as a result of our safety system"; handle both without crashing.
Last updated: October 2026
Retired: The AI-102 outline still says "Use the DALL-E model to generate images", but Microsoft retired dall-e-3 in Azure OpenAI on March 4, 2026 (existing deployments stop working) and dall-e-2 on January 27, 2025. Current image generation uses the gpt-image series.
Quick Answer: Azure OpenAI creates images via the Images API with a gpt-image model. GPT-Image-1 supports 1024x1024, 1024x1536, 1536x1024 , quality low/medium/high (default high), and 1-10 images per call with n . Output is base64 only ( b64_json , no URL). gpt-image models also edit images with a mask. Content filters screen both the prompt and the output image.
- Generating an Image import base64
- from openai import AzureOpenAI
- client = AzureOpenAI(api_version="2025-04-01-preview",
- azure_endpoint="https://my-openai.openai.azure.com/",
- azure_ad_token_provider=token_provider)
- resp = client.images.generate(
- model="gpt-image-1", # deployment name
- prompt="A serene mountain lake at sunset, digital art",
- n=1, # 1-10 images per request
- size="1024x1024", # or 1024x1536 / 1536x1024
- quality="high" # low, medium, or high (default high)
- )
- image_b64 = resp.data[0].b64_json # base64 only; no URL option
with open("lake.png", "wb") as f:
f.write(base64.b64decode(image_b64))
On the Exam: GPT-Image-1 (like 1-Mini, 1.5 and 2) returns base64 image data, so your code decodes and stores the bytes (for example in Blob Storage); there is no temporary URL to persist.
gpt-image Models at a Glance
- Model Availability Sizes Quality Images per request
- GPT-Image-1 Limited access preview 1024x1024, 1024x1536, 1536x1024 low, medium, high (default high) 1-10 ( n )
- GPT-Image-1-Mini Limited access preview Same three sizes low, medium, high (default medium) 1-10
- GPT-Image-1.5 Limited access preview Same three sizes low, medium, high (default high) 1-10
GPT-Image-2 Generally available Custom sizes: both edges multiples of 16 px, long edge up to 3,840 px low, medium, high 1-10
GPT-Image-2.5 models are also generally available. Trap: 256x256 and 512x512 were DALL-E 2 sizes, and 1792x1024 / 1024x1792 were DALL-E 3 sizes; both models are retired. The one-image-per-request limit was also a DALL-E 3 rule, while gpt-image models accept n from 1 to 10.
Editing with a Mask
gpt-image models accept text and image inputs. The edits endpoint takes an input image, a prompt, and an optional mask that marks the region to change; the mask must be the same size as the input image. This inpainting is the answer whenever a scenario edits part of an existing photo.
Dual Content Filtering
The Image APIs come with a content moderation filter that is applied twice :
- Stage When Result when blocked
- Prompt filter Before generation No image is generated; the error code is contentFilter
Image filter After generation The error message says "Generated image was filtered as a result of our safety system."
Both filters use the same four harm categories as text — hate, sexual, violence, self-harm — at configurable severity. A prompt may pass yet still have its output blocked.
Handling a blocked request
When a request is blocked, you do not get a usable image. Your application must handle this gracefully — show a friendly message and let the user revise the prompt rather than silently failing. Defensive code should anticipate a block at either the prompt or the image stage, not just on submission.
Persisting generated images
Because GPT-Image-1, 1-Mini, 1.5 and 2 return base64 data, production apps decode the bytes and store them in durable storage such as Azure Blob Storage with their own access controls. To get several variations, set n (up to 10) instead of looping.
Historical: DALL-E 3
Older study material and the AI-102 outline describe DALL-E 3: sizes 1024x1024, 1792x1024 and 1024x1792, one image per request, quality standard/hd, style vivid/natural, a temporary URL, and an automatic revised_prompt . Those parameters belong to a model Microsoft retired on March 4, 2026, so don't treat them as current answers.
On the Exam: Remember the dual filter (prompt AND image), the gpt-image sizes and n range, base64-only output , and mask-based editing . If an item still offers DALL-E 3, treat it as the retired model; the current Azure OpenAI image models are the gpt-image series.