Create image
This endpoint processes requests to generate images using AI models by forwarding them to the appropriate AI node. The request metadata and compute units have already been validated by middleware before reaching this handler.
Errors
- Returns various status codes based on the underlying
handle_image_generation_response
:INTERNAL_SERVER_ERROR
- If there’s an error communicating with the AI node
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
Request body for image generation
The model to use for image generation.
A text description of the desired image(s). The maximum length is 1000 characters.
The number of images to generate. Defaults to 1.
x > 0
The quality of the image that will be generated.
hd
creates images with finer details and greater consistency across the image.
The format in which the generated images are returned.
The size of the generated images.
The style of the generated images.
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.