Lesson 3 of 3 · AI Image & Video Creation
The Responses API Approach
The Images API generates standalone images. The Responses API does something fundamentally different -- it integrates image generation into a conversational flow, enabling multi-turn editing, partial streaming, and a more natural creative workflow.
Think of the Images API as a vending machine: put in a prompt, get an image. The Responses API is more like working with a designer: you describe what you want, they show you a draft, you give feedback, they revise. The conversation continues until you are satisfied.
Image Generation via Responses API
Instead of a dedicated images endpoint, you use the standard chat-style responses endpoint with image generation enabled:
The key difference: the model can reason about the image, describe what it created, and respond to follow-up instructions -- because the image generation happens within a conversation context.
Multi-Turn Editing
This is where the Responses API shines. You can iteratively refine an image through conversation:
Multi-turn editing through the Responses API is often faster and cheaper than generating multiple independent images and picking the best one. Each turn builds on the previous context, so the model understands your preferences and maintains consistency. It is the difference between giving a designer one vague brief versus having a 5-minute conversation.
Partial Image Streaming
The Responses API supports partial image streaming -- the image is delivered in stages as it generates. This is valuable for user-facing applications where showing progressive results keeps users engaged during the 5-15 second generation time.
You can request 0 to 3 partial image previews. Each partial is a lower-resolution version of the in-progress image. This creates a satisfying "reveal" effect in user interfaces:
Transparent Backgrounds
The Responses API supports generating images with transparent backgrounds -- essential for logos, product overlays, stickers, and any image that needs to be composited onto other content.
Request transparent backgrounds for any image that will be placed on top of other content -- logos, icons, product cutouts, character art, stickers. Save as PNG to preserve the alpha channel.
Generate images with backgrounds and then try to remove them in post-processing. AI background removal is imperfect. It is much better to generate with transparency from the start when the option is available.
Output Format Options
The Responses API supports both JPEG and PNG output:
- PNG: Lossless compression, supports transparency, larger file sizes. Use for images with text, logos, or anything needing transparency.
- JPEG: Lossy compression, smaller file sizes, no transparency. Use for photographs and content images where file size matters.
When to Use Responses API vs Images API
| Scenario | Best Choice | Why |
|---|---|---|
| Single image, no iteration needed | Images API | Simpler, direct |
| Iterative design refinement | Responses API | Multi-turn context |
| User-facing with loading states | Responses API | Partial streaming |
| Transparent backgrounds needed | Responses API | Native support |
| Batch generation of similar images | Images API | Parallel calls |
| Integrated text + image output | Responses API | Combined response |
Design a 4-turn multi-turn conversation flow for creating a company logo using the Responses API. Write out the exact input text for each turn, following the refinement pattern: Turn 1 (composition), Turn 2 (color and style), Turn 3 (text and details), Turn 4 (final polish and transparent background). Include the previous_response_id linkage in your pseudocode.
Use ← → to navigate, Space to mark complete