GPT Image 2
client.images.generate(params)/v1/images/generationsGenerate images with the provider-compatible OpenAI Images API. This synchronous endpoint returns image data directly.
Request body
Use the native OpenAI Images request shape. The model must be gpt-image-2.
ImageGenerateParamsUse gpt-image-2 on this endpoint.
Default: gpt-image-2
Text description of the image to generate.
Number of images to generate when supported.
Output dimensions supported by the model.
Output quality such as low
Background setting such as transparent
Output encoding such as png
Output compression level from 0 to 100.
Provider-compatible moderation setting.
Provider-compatible end-user identifier.