New: AI video tools. Cut, clip, caption and dub your videos. See all video tools →
Images

Image Generate

POST
/api/v1/images

Start generating images from a prompt.

One generation runs at a time. Poll GET /api/v1/images/{generation_id} for progress and finished images. Returns 409 while another generation or a GPU job is running.

Request Body

application/json
  1. body
model_id*Model Id

Image model, from GET /api/v1/images/models

Lengthlength <= 64
prompt*Prompt

What to draw

Length1 <= length <= 2000
negative_prompt?|

What to avoid. Only for models whose negative_prompt is true

count?|

Number of images. Defaults to the model's images value

aspect?|

Image shape. Defaults to the model's size

seed?|

Seed for the first image. Each next image uses the next seed

steps?|

Sampling steps, within the model's steps_range. Defaults to the model's steps

guidance?|

Prompt guidance, within the model's guidance_range. Defaults to the model's guidance

Response Body

Successful Response

response?unknownapplication/json
Example Request
curl -X POST 'http://127.0.0.1:8100/api/v1/images' \  -H 'Content-Type: application/json' \  -d '{  "model_id": "string",  "prompt": "string"}'
Example Response
null