Skip to content

FLUX.1 [dev] with Controlnets and Loras

POST/v1/run

Flux General by BFL - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.

Request body

Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.

stringmodelrequired

Model identifier. Set to bfl/flux-general.

Default: bfl/flux-general

stringpromptrequired

The prompt to generate an image from.

Optional<string>aspect_ratio

The aspect ratio of the generated image.

Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16

Default: 16:9

Optional<number>guidance_scale

The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.

Range: 0 to 20

Default: 3.5

Optional<integer>num_inference_steps

The number of inference steps to perform.

Range: 1 to 50

Default: 28

Optional<string>output_format

The format of the generated image.

Allowed values: jpeg, png

Default: png

Optional<integer>seed

The same seed and the same prompt given to the same version of the model will output the same image every time.

Optional<number>nag_scale

The scale for NAG. Higher values will result in a image that is more distant to the negative prompt.

Maximum: 10

Default: 3

Optional<number>real_cfg_scale

The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.

Range: 0 to 5

Default: 3.5

Optional<number>reference_strength

Strength of reference_only generation. Only used if a reference image is provided.

Range: -3 to 3

Default: 0.65

Optional<array<object>>control_loras

The LoRAs to use for the image generation which use a control image. You can use any number of LoRAs and they will be merged together to generate the final image.

Default:

Optional<array<object>>easycontrols

EasyControl Inputs to use for image generation.

Default:

Optional<number>nag_tau

The tau for NAG. Controls the normalization of the hidden state. Higher values will result in a less aggressive normalization, but may also lead to unexpected changes with respect to the original image. Not recommended to change this value.

Default: 2.5

Optional<number>base_shift

Base shift for the scheduled timesteps

Range: 0.01 to 5

Default: 0.5

Optional<array<object>>loras

The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image.

Default:

Optional<number>reference_end

The percentage of the total timesteps when the reference guidance is to be ended.

Range: 0 to 1

Default: 1

Optional<number>nag_end

The proportion of steps to apply NAG. After the specified proportion of steps has been iterated, the remaining steps will use original attention processors in FLUX.

Maximum: 1

Default: 0.25

Optional<number>reference_start

The percentage of the total timesteps when the reference guidance is to bestarted.

Range: 0 to 1

Default: 0

Optional<array<object>>controlnets

The controlnets to use for the image generation. Only one controlnet is supported at the moment.

Default:

Optional<boolean>use_cfg_zero

Uses CFG-zero init sampling as in https://arxiv.org/abs/2503.18886.

Default: false

Optional<boolean>use_real_cfg

Uses classical CFG as in SD1.5, SDXL, etc. Increases generation times and price when set to be true. If using XLabs IP-Adapter v1, this will be turned on!.

Default: false

Optional<array<object>>ip_adapters

IP-Adapter to use for image generation.

Default:

Optional<string>scheduler

Scheduler for the denoising process.

Allowed values: euler, dpmpp_2m

Default: euler

Optional<array<object>>controlnet_unions

The controlnet unions to use for the image generation. Only one controlnet is supported at the moment.

Default:

Optional<string>reference_image_url

URL of Image for Reference-Only

Optional<string>sigma_schedule

Sigmas schedule for the denoising process.

Optional<number>nag_alpha

The alpha value for NAG. This value is used as a final weighting factor for steering the normalized guidance (positive and negative prompts) in the direction of the positive prompt. Higher values will result in less steering on the normalized guidance where lower values will result in considering the positive prompt guidance more.

Maximum: 1

Default: 0.25

Optional<number>max_shift

Max shift for the scheduled timesteps

Range: 0.01 to 5

Default: 1.15

Optional<string>fill_image

Use an image input to influence the generation. Can be used to fill images in masked areas.

Optional<boolean>use_beta_schedule

Specifies whether beta sigmas ought to be used.

Default: false

Response Schema

The submit endpoint returns a run response. If its status is pending or running, poll GET /v1/run/{id} with the returned opaque ID until it reaches a terminal state.

stringidrequired

Opaque SandBase run identifier. Use it exactly as returned; no prefix is guaranteed.

stringstatusrequired

Current public run status.

Allowed values: pending, running, completed, failed, timeout

Optional<string>model

Public SandBase model name used for this run.

Optional<array<object>>outputs

Present only for completed runs. Each object is capability-specific; inspect the selected model schema for its fields.

Optional<object>error

Present only for failed or timeout runs. Contains a public error type and sanitized message.

Optional<string>error.type

Stable public error category.

Optional<string>error.message

Sanitized error message safe to show to clients.

Optional<object>usage

Usage details when available.

Model capabilities

array<string>capability_tagsrequired

Capabilities declared by the model registry.

Default: text-to-image

stringexecution_moderequired

Execution mode declared by the model registry.

Default: async