Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Model-specific image options.

model
string
required

Required. Use a model ID or available alias returned by Get Models.

Minimum string length: 1
Examples:

"flux-2-flex"

"flux-2-max"

"flux-pro-1.1"

"flux-dev"

prompt
string
required
Minimum string length: 1
size
string

Output size as WIDTHxHEIGHT, or auto for the model default. Supported sizes depend on the selected model.

Pattern: ^(auto|[1-9][0-9]*x[1-9][0-9]*)$
seed

Model-specific image options.

output_format
enum<string>
Available options:
jpeg,
png
safety_tolerance

Model-specific image options.

response_format
enum<string>
default:url

Response format: url returns image URLs; b64_json returns Base64 image data.

Available options:
url,
b64_json
images
(string | object)[]

Optional reference images for image-to-image generation. Omit for text-to-image generation. Image limits depend on the selected model.

Required array length: 1 - 4 elements
Minimum string length: 1
n
integer
default:1

Only 1 is supported.

Response

200 - application/json

Success

created
integer
required

Creation timestamp.

data
object[]
required
Minimum array length: 1
model
string
output_format
string
size
string
quality
string
background
string
usage
object