6.5 DALL-E Image Generation

Key Takeaways

  • DALL-E 3 generates high-quality images from text descriptions through the Azure OpenAI Service Images API.
  • Supported sizes are 1024x1024, 1792x1024, and 1024x1792 — all generating detailed, high-resolution images.
  • DALL-E 3 automatically revises prompts to add detail and safety-oriented language, and the revised prompt is returned in the response.
  • Content filtering is applied to both the text prompt (input) and the generated image (output) using the same harm categories as text.
  • Image generation has specific responsible AI restrictions: no photorealistic faces of real people, no copyrighted character reproductions, and content filter enforcement.
Last updated: March 2026

DALL-E Image Generation

Quick Answer: DALL-E 3 generates images from text prompts via the Azure OpenAI Images API. Supported sizes: 1024x1024, 1792x1024, 1024x1792. DALL-E automatically revises prompts for detail and safety. Content filtering screens both prompts and generated images.

Generating Images with DALL-E 3

from openai import AzureOpenAI

client = AzureOpenAI(
    api_key="<your-key>",
    api_version="2024-06-01",
    azure_endpoint="https://my-openai.openai.azure.com/"
)

response = client.images.generate(
    model="dall-e-3-deployment",
    prompt="A serene mountain landscape at sunset with a reflection in a lake, digital art style",
    n=1,  # DALL-E 3 only supports n=1
    size="1024x1024",  # or "1792x1024" or "1024x1792"
    quality="standard",  # or "hd" for higher detail
    style="vivid"  # or "natural" for more photographic
)

# Get the image URL
image_url = response.data[0].url
revised_prompt = response.data[0].revised_prompt
print(f"Image URL: {image_url}")
print(f"Revised prompt: {revised_prompt}")

DALL-E 3 Parameters

ParameterOptionsDescription
size1024x1024, 1792x1024, 1024x1792Output image dimensions
qualitystandard, hdHD produces more detailed images (higher cost)
stylevivid, naturalVivid = hyper-real/dramatic; Natural = more realistic
n1 onlyDALL-E 3 generates one image per request

Prompt Revision

DALL-E 3 automatically rewrites your prompt to add:

  • More descriptive detail for better image quality
  • Safety-oriented language to avoid harmful content
  • Artistic direction when the original prompt is vague

The revised prompt is always returned in the response so you can see what was actually used.

Content Filtering for Images

CheckWhenWhat
Prompt filterBefore generationScreens text for harmful image requests
Image filterAfter generationAnalyzes generated image for harmful content
Copyright protectionAfter generationPrevents reproducing copyrighted works

Responsible AI Restrictions

  • Cannot generate photorealistic images of identifiable real people
  • Cannot reproduce copyrighted characters or trademarked logos
  • Violence, self-harm, sexual, and hate content filters apply
  • DALL-E refuses prompts asking for harmful, misleading, or deceptive imagery

On the Exam: Know that DALL-E 3 on Azure includes content filtering on BOTH input prompts AND generated images. Questions may test whether you understand the dual-filter approach and the revised prompt feature.

Test Your Knowledge

What sizes does DALL-E 3 support on Azure OpenAI?

A
B
C
D
Test Your Knowledge

What is the "revised_prompt" field in the DALL-E 3 response?

A
B
C
D
Test Your Knowledge

How many images can DALL-E 3 generate per API request?

A
B
C
D