GPT Image 2.6 returns Base64-encoded image data in
data[].b64_json. Responses also include data[].revised_prompt and token usage accounting. Do not send the DALL·E-only response_format parameter.- Generate images
- Edit images
Generate images
POST /v1/images/generationscURL
Request headers
Request body
auto or a custom WIDTHxHEIGHT value. Width and height must be multiples of 16, the aspect ratio must be between 1:3 and 3:1, neither edge may exceed 3,840 pixels, and total pixels must be between 655,360 and 8,294,400.Planning effort:
low, medium, or high. Higher complexity can help with dense text and complex layouts but may increase latency.Background mode:
auto, opaque, or transparent. Transparent backgrounds require PNG or WebP output.Output format:
png, jpeg, webp, or gif. GIF generation also requires frame_count and frame_duration_ms.Number of GIF frames, from
2 through 16. The requested size and frame count must fit the total pixel budget.GIF frame duration from
20 through 2,000 milliseconds, rounded to 10 milliseconds.Optional stable, privacy-preserving identifier for the end user. Keep it at 128 characters or fewer.
Generation response
200
Request rules
background="transparent"requiresoutput_format="png"oroutput_format="webp".- Custom width and height must be divisible by 16, use an aspect ratio from
1:3through3:1, keep each edge at or below 3,840 pixels, and contain 655,360–8,294,400 total pixels. - Resolutions above
2560x1440are experimental. output_compressionapplies only to JPEG and WebP output. GIF does not support compression.- For GIF output,
1024x1024exceeds the total pixel budget at the default 9 frames, so use1024x768. complexityacceptslow,medium, orhigh; if omitted, the model useshigh.- GPT Image 2.6 returns Base64 image data; URL output through
response_formatis not supported.