v2

OpenAPI 3.1.02026-07-26262762.2 KB
Models

Generate or edit an image with FLUX.2 [flex]

Submits an image generation or editing task with FLUX.2 [flex]. Specialized for typography and text rendering, and for preserving small details. Supports text-to-image and image-to-image editing workflows.

post/v1/flux-2-flex

Request body

promptstring required

Text prompt for image generation.

prompt_upsamplingboolean nullable

Whether to use prompt upsampling.

input_imagestring nullable

Path to the input image.

input_image_2string nullable

Path to the second input image.

input_image_3string nullable

Path to the third input image.

input_image_4string nullable

Path to the fourth input image.

input_image_5string nullable

Path to the fifth input image.

input_image_6string nullable

Path to the sixth input image.

input_image_7string nullable

Path to the seventh input image.

input_image_8string nullable

Path to the eighth input image.

input_image_blob_pathstring nullable

Blob path to the input image.

seedinteger nullable

Optional seed for reproducibility.

widthinteger nullable

Width of the image

heightinteger nullable

Height of the image

guidancenumber nullable

Guidance scale for image generation. High guidance scales improve prompt adherence at the cost of reduced realism.

stepsinteger nullable

Number of steps for image generation. Higher steps lead to more detailed and realistic images.

safety_toleranceinteger

Tolerance level for input and output moderation. Between 0 and 5, 0 being most strict, 5 being least strict. If you wish to increase the safety_tolerance beyond these levels please reach out to the team.

output_format'jpeg' | 'png' | 'webp'
webhook_urlstring uri nullable

URL to receive webhook notifications

webhook_secretstring nullable

Optional secret for webhook signature verification

Example request

{
  "prompt": "ein fantastisches bild",
  "seed": 42,
  "guidance": 5,
  "steps": 50
}

Response

Successful Response

OR