Skip to main content
POST
Generates images from a text prompt.

Body

string
required
Model tag.
string
required
Text prompt describing the image.
integer
Number of images to generate. Defaults to 1.
string
Image size: auto, 256x256, 512x512, 1024x1024, 1536x1024, 1024x1536, 1792x1024, or 1024x1792. Defaults to auto, which uses the model’s native size.
string
Image format: png, jpeg, or webp. Defaults to png.
integer
Compression level from 0 to 100, for the jpeg and webp formats.
string
Background transparency, for models that support it.

Response

integer
required
Unix timestamp, in seconds, when the images were created.
Image[]
required
Generated images.