Create an Image
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
input
A text description of the desired image(s).
The model to use for image generation. One of openai/dall-e-2, openai/dall-e-3, or openai/gpt-image-1.
Allows to set transparency for the background of the generated image(s). This parameter is only supported for openai/gpt-image-1.
transparent, opaque, auto Control the content-moderation level for images generated by gpt-image-1. Must be either low or auto.
low, auto The number of images to generate. Must be between 1 and 10. For dall-e-3, only n=1 is supported.
1 <= x <= 10The compression level (0-100%) for the generated images. This parameter is only supported for gpt-image-1 with the webp or jpeg output formats.
0 <= x <= 100The format in which the generated images are returned. This parameter is only supported for openai/gpt-image-1.
png, jpeg, webp The quality of the image that will be generated. auto will automatically select the best quality for the given model.
auto, high, medium, low, hd, standard The format in which generated images are returned. Must be one of url or b64_json. This parameter isn't supported for gpt-image-1 which will always return base64-encoded images.
url, b64_json The size of the generated images. Must be one of the specified sizes for each model.
The style of the generated images. This parameter is only supported for openai/dall-e-3. Must be one of vivid or natural.
vivid, natural The name to display on the trace. If not specified, the default system name will be used.
Array of fallback models to use if primary model fails
Retry configuration for the request
Cache configuration for the request.
Load balancer configuration for the request.
Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.