Generate an image
Official API reference for image generation workloads can be found on the corresponding models pages, upon clicking “view code”. We support generating images from text prompts, other images, and/or ControlNet.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Headers
Bearer authentication header of the form Bearer <API_KEY>, where <API_KEY> is your auth token.
Specifies which format to return the response in. With image/png
and image/jpeg
, the server will populate the response body with a binary image of the specified format. With application/json
, the server will populate the response body with schema {base64: [string, ...], finishReason: string enum [SUCCESS, CONTENT_FILTERED], seed: int}. base64
contains a list of base64-encoded image files in PNG format. finishReason
is SUCCESS unless safety_check=true
and the image response was filtered. seed
is the seed that was used when generating the image.
image/png
, image/jpeg
, application/json
Body
Response
OK