Inference API

Images

Image generation

/v1/images/generations

Generate an image based on a prompt. This is the endpoint for making generation requests to image generation models.

Request Body

Response Body

data

array

A list of generated image objects.


Image edit

/v1/images/edits

Edit an image based on a prompt. This is the endpoint for making edit requests to image generation models.

Request Body

prompt

string

required

Prompt for image editing.

Response Body

data

array

A list of generated image objects.


Get deferred image results

/v1/images/{request_id}

GET /v1/images/{request_id}: 202 while pending, 200 with data when done or with error when failed (a failed generation is a body, not an HTTP error, so pollers do not retry-storm).

Path parameters

request_id

string

required

The deferred request id returned by a previous image request.

Response Body

request_id

string

The polled request id.

status

string

"pending", "done" or "failed".


Last updated: October 2, 2026