Card 23 of 38· Domain 3 · Computer vision
Generating and editing images and video
Which model and which call, why there is never a URL to read back, and the mask rule that is inverted from most people’s intuition.

Generation is a small topic with a lot of specific constants, and two of them behave in ways that catch people out.
Which model, which call
| Task | Model or filter | The call |
|---|---|---|
| Text to image | Filter the catalogue by text to image. GPT-image-1, -mini, -1.5, -2, FLUX, MAI-Image |
client.images.generate |
| Editing or inpainting | The same GPT-image family | images.edit, as multipart/form-data |
| Text to video | Sora 2 — filter by video generation |
client.videos.create, asynchronous |
Reading the image result
GPT-image always returns base64, in result.data[0].b64_json.
response_format is not supported. There is no URL option at all. You decode the bytes and write the file yourself.
This matters because plenty of image APIs elsewhere hand you a URL, so a URL-returning answer looks entirely plausible. It is wrong here every time.
Image parameters
sizequality— low, medium or highnoutput_format— PNG or JPEG. WEBP is not supported.background=transparentrequires PNG.
Video mechanics
Video is asynchronous: videos.create, then poll videos.retrieve, then videos.download_content.
secondsaccepts 4, 8 or 12.remixapplies one targeted edit.input_referencedrives image-to-video.
The mask rule
Masks are inverted relative to most people's intuition, so read this twice.
- The mask is a PNG.
- Fully transparent pixels — alpha 0 — mark the region to edit.
- The mask must match the image dimensions exactly.
So the transparent part is what gets repainted, not the opaque part. Most people assume the reverse: that they are painting over the area they want changed. Getting it backwards produces an image where everything except the intended region has been regenerated, which is a memorable way to learn it.
Safety and provenance
- Every generated image carries C2PA Content Credentials — provenance metadata recording that it was AI-generated.
- Photorealistic images of minors are blocked by default.
- A harmful prompt returns no image, rather than a filtered or degraded one.
Retired, and never the answer
dall-e-3 was retired on 4 March 2026, and dall-e-2 before it. Neither is ever a correct answer now.
Their old parameters travel with them as distractors: quality=hd/standard and style=vivid/natural belong to DALL-E, not to the GPT-image family. Seeing either in an option is a reliable signal that the option was written for the previous generation.