Theme
/fal-ai/flux-pro/kontext
POST
https://www.kkiai.com/fal-ai/flux-pro/kontext
Official documentation: https://fal.ai/models/fal-ai/flux-pro/kontext
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value should be the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Body Parameters (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | |
guidance_scale | number | Optional | CFG (Classifier-Free Guidance) scale used to measure how closely you want the model to adhere to the prompt when searching for relevant images. Default: 3.5 Range: 1-20 |
num_images | integer | Optional | Number of images to generate. Default: 1 Range: 1-4 |
output_format | string | Optional | Format of generated images. Default: "jpeg" Supported: default, png, jpeg |
safety_tolerance | string | Optional | Safety tolerance level for generated images. 1 is most strict, 5 is most lenient. Default: "2" |
image_url | string | Required | Drag and drop file here, or provide a base64-encoded data URL. Accepted file types: jpg, jpeg, png, webp, gif, avif |
Request Example
json
{
"prompt": "Put a donut next to the flour.",
"guidance_scale": 3.5,
"num_images": 1,
"output_format": "jpeg",
"safety_tolerance": "2",
"image_url": "https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png"
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/fal-ai/flux-pro/kontext' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "Put a donut next to the flour.",
"guidance_scale": 3.5,
"num_images": 1,
"output_format": "jpeg",
"safety_tolerance": "2",
"image_url": "https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png"
}'Response
🟢 200 Success
Response Example
json
{
"status": "IN_QUEUE",
"request_id": "acf05732-7cb3-445b-9f39-fdaeccb1d730",
"response_url": "https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730",
"status_url": "https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730/status",
"cancel_url": "https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730/cancel",
"logs": null,
"metrics": {},
"queue_position": 0
}