data array. Select the tab below for the endpoint you need.
- Generate
- Edit
- Variations
POST /v1/images/generations
Generate one or more images from a text description. The model creates the image from scratch based on your prompt.Request parameters
string
required
A text description of the image you want to generate. More detailed prompts generally produce better results.
string
The image generation model to use. Defaults to the provider’s standard model if omitted. Use the list models endpoint for available options.
integer
default:"1"
The number of images to generate. Each image is returned as a separate item in the
data array.string
default:"1024x1024"
The dimensions of the generated images. Supported values depend on the model. Common options include
"256x256", "512x512", and "1024x1024".string
default:"url"
How to return the generated image. Use
"url" for a temporary hosted URL or "b64_json" for a Base64-encoded string.