What output sizes and aspect ratios can I request from OpenAI's image API, and which are only for the newer GPT Image models (arbitrary WIDTHxHEIGHT within limits, 3840 max edge) versus the three fixed sizes?
Problem. An agent must pick a size string for gpt-image requests without a rejected call. Conditions. Image API generations and edits; model matters. Method. The guide lists three recommended sizes (1024x1024, 1536x1024, 1024x1536) and, for gpt-image-2.5-sunburst and -flare, custom WIDTHxHEIGHT strings: both edges multiples of 16, ratio between 1:3 and 3:1, no edge above 3840, total pixels 655,360 to 8,294,400; above 2560x1440 is labelled experimental. The openapi.yaml schema for both generations and edits states the same arbitrary-resolution rule for gpt-image-2, gpt-image-2.5-sunburst and -flare and their dated snapshots, and keeps a legacy enum of 1024x1024, 1536x1024, 1024x1536, auto (plus 256x256 and 512x512 flagged as retained only for SDK compatibility). The guide's collapsed earlier-model section gives gpt-image-2 popular sizes including 2048x2048, 2048x1152, 3840x2160 and 2160x3840 and the same constraints. Failure modes. Sending a free-form size to older models such as gpt...
Structured fields
{
"citations": [
{
"url": "https://developers.openai.com/api/docs/guides/image-generation.md",
"note": "Customize Image Output > Size and quality options; Size and quality options; CreateImageEditRequest / size description; Customize Image Output > Size and quality options"
},
{
"url": "https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml",
"note": "Customize Image Output > Size and quality options; Size and quality options; CreateImageEditRequest / size description; Customize Image Output > Size and quality options"
}
]
}Evidence claims
- [sourced_fact] Problem. An agent must pick a size string for gpt-image requests without a rejected call. Conditions. Image API generations and edits; model matters. Method. The guide lists three recommended sizes (1024x1024, 1536x1024, 1024x1536) and, for gpt-image-2.5-sunburst and -flare, custom WIDTHxHEIGHT strings: both edges multiples of 16, ratio between 1:3 and 3:1, no edge above 3840, total pixels 655,360 to 8,294,400; above 2560x1440 is labelled experimental. The openapi.yaml schema for both generations and edits states the same arbitrary-resolution rule for gpt-image-2, gpt-image-2.5-sunburst and -flare and their dated snapshots, and keeps a legacy enum of 1024x1024, 1536x1024, 1024x1536, auto (plus 256x256 and 512x512 flagged as retained only for SDK compatibility). The guide's collapsed earlier-model section gives gpt-image-2 popular sizes including 2048x2048, 2048x1152, 3840x2160 and 2160x3840 and the same constraints. Failure modes. Sending a free-form size to older models such as gpt-image-1.5 is not documented as supported; the spec says the request must also satisfy the model's current pixel and edge limits, which are not enumerated. Limitations. No pricing here. Version/date. Pages fetched 2026-10-24T00:55:40Z; spec still lists gpt-image-1 as shut down on October 23, 2026. · locator: Customize Image Output > Size and quality options; Size and quality options; CreateImageEditRequest / size description; Customize Image Output > Size and quality options source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |