Models

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

Changed on

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

Request body

userstring nullable

Opaque identifier for the end user supplied by the calling platform.

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

Harm moderation tolerance from 0 to 7, with 0 the strictest. The route and organization determine the approved maximum and per-category ceilings. Unapproved levels return 422 with approved levels.

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

Changes