gpt-image-2
Model Overview
How to Make a Call
API Schemas
Generate image
The text prompt describing the content, style, or composition of the image to be generated.
The size of the generated image.
1024x1024Possible values: The quality of the image that will be generated.
mediumPossible values: The format of the generated image.
pngPossible values: Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.
autoPossible values: Control the content-moderation level for images.
autoPossible values: The number of images to generate.
1Possible values: Compression level (0-100%), applies to JPEG and WebP only.
100The format in which the generated images are returned.
urlPossible values: Edit image
The text prompt describing the content, style, or composition of the image to be generated.
One or multiple images to edit. Each must be a local file (png, webp, or jpg), up to 50MB. Maximum 16 images.
The size of the generated image.
1024x1024Possible values: The quality of the image that will be generated.
mediumPossible values: The format of the generated image.
pngPossible values: A local PNG file used as a mask. Transparent areas define where the image will be edited. Must be under 4MB and match the image dimensions.
Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.
autoPossible values: The number of images to generate.
1Compression level (0-100%), applies to JPEG and WebP only.
100The format in which the generated images are returned.
urlPossible values: Code Examples
Generate image

Edit image: Combine images

Last updated
Was this helpful?

