v2

latestOpenAPI 3.1.02026-07-26262762.2 KB
Models

Generate or edit an image with FLUX.2 [klein] 9B

Submits an image generation or editing task with FLUX.2 [klein] 9B. Sub-second inference with open weights, balancing quality and speed.

post/v1/flux-2-klein-9b

Request body

promptstring required

Text prompt for image generation.

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.

seedinteger nullable

Optional seed for reproducibility.

widthinteger nullable

Width of the image

heightinteger nullable

Height of the image

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
}

Response

Successful Response

OR