Skip to main content
POST
/
v1
/
flux-kontext-max
Edit or create an image with Flux Kontext Max
curl --request POST \
  --url https://api.bfl.ai/v1/flux-kontext-max \
  --header 'Content-Type: application/json' \
  --header 'x-key: <api-key>' \
  --data '{
  "prompt": "ein fantastisches bild",
  "input_image": "<string>",
  "input_image_2": "<string>",
  "input_image_3": "<string>",
  "input_image_4": "<string>",
  "seed": 42,
  "aspect_ratio": "<string>",
  "output_format": "jpeg",
  "webhook_url": "<string>",
  "webhook_secret": "<string>",
  "prompt_upsampling": false,
  "safety_tolerance": 2
}'
{
  "id": "<string>",
  "polling_url": "<string>"
}

Authorizations

x-key
string
header
required

Body

application/json
prompt
string
required

Text prompt for image generation.

Example:

"ein fantastisches bild"

input_image
string | null

Base64 encoded image or URL to use with Kontext.

input_image_2
string | null

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

input_image_3
string | null

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

input_image_4
string | null

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

seed
integer | null

Optional seed for reproducibility.

Example:

42

aspect_ratio
string | null

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

output_format
enum<string> | null
default:png

Output format for the generated image. Can be 'jpeg' or 'png'.

Available options:
jpeg,
png
webhook_url
string<uri> | null

URL to receive webhook notifications

Required string length: 1 - 2083
webhook_secret
string | null

Optional secret for webhook signature verification

prompt_upsampling
boolean
default:false

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

safety_tolerance
integer
default:2

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

Required range: 0 <= x <= 6
Example:

2

Response

Successful Response

  • AsyncResponse
  • AsyncWebhookResponse
id
string
required
polling_url
string
required