AI-901 ยท Vision and image generation solutions
Generating images with a model
Calling an image generation model with a text prompt: size, quality and count parameters, prompt wording, returned image data, and content safety filtering.
Key points
- Call client.images.generate with the deployment name as model, a text prompt, and size, quality and n. GPT-image models return the picture as base64 in data[0].b64_json, which you decode and save.
- The safety system can block the prompt or the output.
- DALL-E 3 is retired.
Source: https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/dall-e
Practice questions
How does a GPT-image deployment return the generated picture?
- As a temporary download URL in data[0].url
- As a file attached to an email
- As base64 text in data[0].b64_json
- As a binary stream in the HTTP headers
Show answer
Answer: C. As base64 text in data[0].b64_json
GPT-image models always answer with base64 in b64_json. A URL response was the DALL-E habit, and it is not offered here.
Which parameters of an image generation call shape the output?
- size, the image dimensions
- quality, such as low, medium or high
- n, how many images to create
- detail, the input-image fidelity level
- top_k, the sampling cutoff
Show answer
Answer: A. size, the image dimensions, B. quality, such as low, medium or high, C. n, how many images to create
size, quality and n are generation parameters. detail belongs to image input for chat models, and top_k is not an images.generate parameter.
True or false: DALL-E 3 is the recommended model to deploy for new image generation work.
Show answer
Answer: False
False. DALL-E 3 was retired on March 4, 2026; the gpt-image series replaces it.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
