Skip to main content
Generate and edit images with OpenAI’s GPT image models — gpt-image-2.5-flare (the default) and gpt-image-2.5-sunburst. gpt-image-2.6-flare and gpt-image-2.6-sunburst are launching but may not be available on every project yet (403 model_not_found).

Generate

GPT image models always return the image as base64.

With Options

quality is sent whenever you set it, for any model. GPT image accepts "low", "medium", "high", "xhigh", "max", "auto". Images 2.5/2.6 params such as frame_count, frame_duration_ms, complexity, and output_format pass through unchanged.
style is only supported by the retired dall-e-3. ImageAgent only sends style when you set it explicitly, and drops it automatically on GPT image models — put style cues in the prompt instead.
Reference: PR #6262, fixes #6259. Earlier: PR #6077, PR #6097.

Edit

ImageAgent.edit(..., markup=...) raises ValueError — LiteLLM does not upload markup as a file, so it would be silently ignored. Use mask= instead, or call the OpenAI SDK’s images.edit directly.

Response Format

GPT image models always return base64 and reject response_format. Leave it unset — ImageAgent does not send its default "url", so no extra configuration is needed.

Models

OpenAI retired dall-e-2/dall-e-3 on 2026-05-12 and gpt-image-1 on 2026-10-23. dall-e-2 is kept only for variation().