GPT-Image-2
Image Series
GPT-Image-2
OpenAI GPT-Image-2 text-to-image and image-to-image
POST
GPT-Image-2
Introduction
GPT-Image-2 usesPOST /v1/images/generations for both text-to-image and image-to-image: omit image for T2I; include image (URL or Base64) for I2I. Responses use b64_json with usage token stats.
For full parameters and other image models, see Image generation.
Authentication
string
required
Bearer Token, e.g.
Bearer sk-xxxxxxxxxxSupported models
Request examples
- Text-to-image
- Image-to-image (generations)
- Image-to-image (edits)
Common parameters
- model:
gpt-image-2 - prompt: Description or edit instruction
- image: Reference image for I2I
- size: e.g.
1024x1024,1024x1536,2880x2880(dimensions multiple of 16) - quality:
low,medium,high - n: Number of images (1â10)
