Skip to content

Image generation endpoint handler.

POST
/v1/images/generations
curl --request POST \
--url https://example.com/v1/images/generations \
--header 'Content-Type: application/json' \
--data '{ "height": 720, "model": "mistral", "n": 1, "prompt": "Draw a picture of a majestic, snow-covered mountain.", "response_format": "Url", "width": 1280 }'
Media type application/json

Image generation request

object
height

Image height in pixels

integer
Example
720
model

Model ID; “default” targets the only loaded model.

string
Example
mistral
n

How many choices to generate.

integer
Example
1
prompt
required
string
Example
Draw a picture of a majestic, snow-covered mountain.
response_format

Return generated images as URLs or base64 data.

string
Allowed values: Url B64Json
width

Image width in pixels

integer
Example
1280

Image generation