Skip to main content
POST
Generate

Authorizations

Authorization
string
header
required

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

Query Parameters

ai_project_id
string | null

current project ID

Body

application/json
model
string
required

ID of the model to use.

Example:

"black-forest-labs/flux-schnell"

prompt
string
required

A text description of the desired image(s).

Required string length: 1 - 2000
loras
LoRA · object[] | null

List of publicly accessible LoRAs compatible with the selected model

Required array length: 1 - 10 elements
Example:
width
integer
default:512

The width of the generated image(s) in pixels.

Required range: 64 <= x <= 2048
height
integer
default:512

The height of the generated image(s) in pixels.

Required range: 64 <= x <= 2048
num_inference_steps
integer | null

Number of denoising steps in the diffusion process. Higher values generally result in higher quality images but take longer to generate.

Required range: 1 <= x <= 80
seed
integer
default:-1

Random seed for image generation. Use -1 for a random seed.

Required range: x >= -1
guidance_scale
number | null

Guidance scale for the model. Higher values make the image adhere more closely to the prompt.

Required range: 0 <= x <= 100
negative_prompt
string
default:""

A text description of the non-desired image(s).

Maximum string length: 2000
response_extension
enum<string>
default:webp

The format of the output image(s).

Available options:
webp,
jpg,
png
response_format
enum<string>
default:url

The way output image will be returned.

Available options:
b64_json,
url

Response

Successful Response

data
ImageObject · object[]
required
id
string
required