POST
/
v1
/
image
/
gen
/
flux
Follow the quickstart guide to get your own API Key.

The FLUX series represents a family of AI image generation models developed by Black Forest Labs. See the pricing page for pricing details.

FLUX.1 Schnell

  • Entry-level model in the FLUX series
  • Optimized for speed and efficiency
  • Balanced performance for general-purpose use

FLUX.1 dev

  • Developer-focused variant
  • Enhanced customization options
  • Flexible parameter adjustments

FLUX.1 pro

  • Professional-grade model
  • Highest quality output in the series
  • Advanced features and controls

Previews

Authorizations

Authorization
string
headerrequired

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

Body

application/json
model
enum<string>
required

The Flux model to use for generation.

Available options:
flux_pro,
flux_dev,
flux_schnell
prompt
string
required

Text prompt for image generation.

Required string length: 1 - 4000
num_outputs
integer
default: 1

Number of images to generate. Supports for flux_dev and flux_schnell. Between 1 and 4.

Required range: 1 < x < 4
size
enum<string>
default: 1024x1024

The aspect ratio of generated images.

Available options:
1024x1024,
768x1344,
1344x768
seed
integer

Random seed. Set for reproducible generation.

Required range: x < 2147483647
steps
integer
default: 25

Number of denoising steps. Supports flux_dev and flux_schnell. For flux_dev between 1 and 50, with a default value of 28. For flux_schnell between 1 and 4, with a default value of 4. For flux_pro between 1 and 50, with a default value of 25.

Required range: 1 < x < 50
guidance
number
default: 3

Controls the balance between adherence to the text prompt and image quality/diversity. Higher values make the output more closely match the prompt but may reduce overall image quality. Lower values allow for more creative freedom but might produce results less relevant to the prompt. Supports flux_pro and flux_dev. Between 2 and 5 for flux_pro. Between 0 and 10 for flux_dev.

interval
integer
default: 2

Interval is a setting that increases the variance in possible outputs letting the model be a tad more dynamic in what outputs it may produce in terms of composition, color, detail, and prompt interpretation. Setting this value low will ensure strong prompt following with more consistent outputs, setting it higher will produce more dynamic or varied outputs. Only supports flux_pro. Between 1 and 4.

Required range: 1 < x < 4
safety_tolerance
integer
default: 2

Safety tolerance, 1 is most strict and 6 is most permissive. Only supports flux_pro. Between 1 and 6.

Required range: 1 < x < 6

Response

200 - application/json
data
object[]

An array of generated image URLs.