Skip to main content
POST
Text-to-Image Generation

Authorizations

Authorization
string
header
required

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

Body

application/json
model
enum<string>
required

Model ID

Available options:
flux-2-flex
Example:

"flux-2-flex"

prompt
string
required

Text description of the image to generate.

Example:

"A cute baby polar bear"

n
integer
default:1

Number of images to generate.

Required range: 1 <= x <= 4
size
string

Output image size, e.g. 1024x1024. Supports up to 4MP resolution.

Example:

"1024x1024"

inference_steps
integer

Number of sampling steps. Low (6–20) for fast prototyping, high (40–50) for maximum fidelity.

Required range: 1 <= x <= 50
guidance_scale
number

Guidance scale. Controls how closely the model follows the prompt. Higher values produce more prompt-faithful results.

Required range: 1.5 <= x <= 10
output_format
enum<string>

Output image format.

Available options:
jpeg,
png
Example:

"jpeg"

seed
integer

Random seed for reproducible generation.

Response

Image generated successfully

created
integer
Example:

1774002799

data
object[]