Bitzu

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

Single choice

How does a GPT-image deployment return the generated picture?

  1. As a temporary download URL in data[0].url
  2. As a file attached to an email
  3. As base64 text in data[0].b64_json
  4. 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.

Select all that apply

Which parameters of an image generation call shape the output?

  1. size, the image dimensions
  2. quality, such as low, medium or high
  3. n, how many images to create
  4. detail, the input-image fidelity level
  5. 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

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.

Download on the App StoreGet it on Google Play

More AI-901 topics in this module