Which output formats, compression levels and transparent-background settings do the OpenAI image generation and edit endpoints document, and which combinations are valid?
Corrected 2026-10-24 - see C3-B955-05; the original statements below are kept for history and are superseded where the correction says so. Problem. Choosing format, compression and background so a generated asset keeps alpha and loads fast. Conditions. GPT image models on the Image API (generations and edits). Method. output_format is png (default), jpeg or webp. output_compression is an integer 0-100 that applies only to jpeg and webp; the openapi schema gives it a default of 100 on edits, and the generation schema constrains it with minimum 0 and maximum 100. The guide says jpeg is faster than png when latency matters. background is transparent, opaque or auto (default); transparent requires png or webp output (jpeg has no alpha). The spec says gpt-image-2.5-sunburst and -flare support opaque and transparent backgrounds, while for gpt-image-2 and gpt-image-2-2026-04-21 transparent support is 'in preview'. Failure modes. transparent with jpeg is outside the documented combination. ...
Structured fields
{
"citations": [
{
"url": "https://developers.openai.com/api/docs/guides/image-generation.md",
"note": "Customize Image Output > Output format; Size and quality options; images generations/edits background description; output_compression (edits); Output format"
},
{
"url": "https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml",
"note": "Customize Image Output > Output format; Size and quality options; images generations/edits background description; output_compression (edits); Output format"
}
]
}Evidence claims
- [sourced_fact] Curator correction 2026-10-24 (discovery audit record C3-B955-05; sources re-fetched 2026-10-24, excerpts re-located by curator GET): C3-B795-02 says the generation schema constrains output_compression with minimum 0 and maximum 100. In master openapi.yaml, CreateImageRequest says: "The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the `webp` or `jpeg` output formats, and defaults to 100." with no minimum or maximum keys. The minimum 0 and maximum 100 appear only in EditImageBodyJsonParam ("Compression level for `jpeg` or `webp` output.") and the Responses ImageGenTool. The default of 100 applies to generations as well as edits. · locator: curator correction paragraph in this record body (C3-B955-05) source
- [sourced_fact] SUPERSEDED IN PART 2026-10-24 by curator correction C3-B955-05 (see the correction claim above); original kept for history: Problem. Choosing format, compression and background so a generated asset keeps alpha and loads fast. Conditions. GPT image models on the Image API (generations and edits). Method. output_format is png (default), jpeg or webp. output_compression is an integer 0-100 that applies only to jpeg and webp; the openapi schema gives it a default of 100 on edits, and the generation schema constrains it with minimum 0 and maximum 100. The guide says jpeg is faster than png when latency matters. background is transparent, opaque or auto (default); transparent requires png or webp output (jpeg has no alpha). The spec says gpt-image-2.5-sunburst and -flare support opaque and transparent backgrounds, while for gpt-image-2 and gpt-image-2-2026-04-21 transparent support is 'in preview'. Failure modes. transparent with jpeg is outside the documented combination. The guide's example 'output_compression=50 will compress the image by 50%' is loose wording; the schema calls it a compression level, not a quality percentage, and does not define the scale. Limitations. The response is base64 only for GPT image models. Version/date. Fetched 2026-10-24T00:55:40Z. · locator: Customize Image Output > Output format; Size and quality options; images generations/edits background description; output_compression (edits); Output format 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. |