GPT-Image-2 represents a milestone leap in OpenAI's image generation technology. Building upon version 1.5, it significantly enhances the capacity to capture subtle linguistic nuances and abstract concepts, producing visual masterpieces with photorealistic quality, intricate textures, and cinematic compositions. With qualitative breakthroughs in human anatomy, complex ray-tracing, and native text rendering, it is the pinnacle choice for cinematic concept design, digital art, and high-end brand asset development.
Generate image
All API requests must be authenticated using a Bearer token in the Authorization header. Please ensure your API key is active.Authorization: Bearer sk-xxxxxx
These parameters come from the selected model form_schema. Switching models updates this list and the request example.
Choose the generation mode. Text to Image: generate from the prompt only. Image to Image (Edit): upload one or more images and edit, compose, or inpaint them with a prompt (optional mask).
prompt*stringDescribe the image you want to generate in detail; in Image-to-Image mode, describe how to edit the uploaded images. Max 32,000 characters.
size?stringSpecify the output image size. Choose 1024x1024, 1536x1024, or 1024x1536. Default 1024x1024.
background?stringSet background transparency. Transparency only works with PNG or WebP.
quality?stringSelect the generation quality level, affecting image detail. Choose Low, Medium, or High. Default Medium.
output_format?stringThe file format of the generated image.
n?numberNumber of images to generate per request (1-10).
partial_images?numberNumber of partial images to stream (0-3). 0 returns only the final image.
moderation?stringControl the level of content moderation and filtering.
output_compression?numberCompression level (0-100%). Only for WebP and JPEG.
created?integerParameter description for Created
data?arrayParameter description for Data