Skip to main content
POST
Generate images

Authorizations

X-API-KEY
string
header
required

Body

application/json
prompt
string
required

What to generate. Refer to references as @Image 1, …

Minimum string length: 1
model_id
string
required

A model id from GET /image/models

resolution
enum<string> | null

One of the model's resolutions; defaults to its default_resolution

Available options:
480p,
720p,
1080p,
2k,
4k
aspect_ratio
enum<string> | null

One of the model's aspect_ratios; defaults to 1:1 when supported

Available options:
16:9,
9:16,
1:1
number_of_images
integer
default:1

How many images to generate in this job

Required range: 1 <= x <= 4
reference_image_ids
string<uuid>[]

Images from POST /image/upload or earlier image jobs, in prompt order. The first is the image being edited; the rest are extra references.

Response

Successful Response

job_id
string<uuid>
required

Poll GET /image/{job_id} with this ID

estimated_credits
number
required

Credits this job will be charged once the images are ready