v1
latestOpenAPI 3.0.02026-07-2380631.2 KBpost/v1/images/generations
Request body
model'openai/gpt-image-1-mini' required
promptstring required
The text prompt describing the content, style, or composition of the image to be generated.
size'1024x1024' | '1024x1536' | '1536x1024'
The size of the generated image.
quality'low' | 'high' | 'medium'
The quality of the image that will be generated.
output_format'png' | 'jpeg' | 'webp'
The format of the generated image.
background'transparent' | 'opaque' | 'auto'
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.
moderation'low' | 'auto'
Control the content-moderation level for images.
n1
The number of images to generate.
output_compressioninteger
Compression level (0-100%), applies to JPEG and WebP only.
response_format'url' | 'b64_json'
The format in which the generated images are returned.