v2

latestOpenAPI 3.1.02026-07-26262762.2 KB
Models

Edit or create an image with FLUX.1 Kontext [max]

Submits an image creation task with FLUX.1 Kontext [max]. For image editing, prefer FLUX.2 [pro] (/flux-2-pro) or FLUX.2 [flex] (/flux-2-flex) which are the recommended default models for editing workflows.

post/v1/flux-kontext-max

Request body

promptstring required

Text prompt for image generation.

input_imagestring nullable

Base64 encoded image or URL to use with Kontext.

input_image_2string nullable

Base64 encoded image or URL to use with Kontext. Experimental Multiref

input_image_3string nullable

Base64 encoded image or URL to use with Kontext. Experimental Multiref

input_image_4string nullable

Base64 encoded image or URL to use with Kontext. Experimental Multiref

seedinteger nullable

Optional seed for reproducibility.

aspect_ratiostring nullable

Aspect ratio of the image between 21:9 and 9:21

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

URL to receive webhook notifications

webhook_secretstring nullable

Optional secret for webhook signature verification

prompt_upsamplingboolean

Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation.

safety_toleranceinteger

Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

Example request

{
  "prompt": "ein fantastisches bild",
  "seed": 42,
  "safety_tolerance": 2
}

Response

Successful Response

OR