Docs Fal.ai /fal-ai/flux-pro/kontext
API reference

/fal-ai/flux-pro/kontext

Official documentation: https://fal.ai/models/fal-ai/flux-pro/kontext

POST/fal-ai/flux-pro/kontext

Body Parametersapplication/json

guidance_scale number

The CFG (Classifier Free Guidance) scale is a measure of how closely you want the model to follow the cues when finding relevant images. Default value: 3.5 Range value 1-20

image_url* string

Drag and drop files here, or provide base64-encoded data URL Accepted file types: jpg, jpeg, png, webp, gif, avif

num_images integer

The number of images generated. Default value: 1 Range value 1-4

output_format string

The format of the generated image. Default value: "jpeg" supports default, png, jpeg

prompt* string

Tips for generating images

safety_tolerance string

The safety tolerance level of the generated image. 1 is the strictest and 5 is the loosest. Default value: "2"

Responses

200 application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"guidance_scale": 3.5,
3"image_url": "https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png",
4"num_images": 1,
5"output_format": "jpeg",
6"prompt": "Put a donut next to the flour.",
7"safety_tolerance": "2"
8}
Code Sample cURL
1curl -X POST "https://api.digislash.com/fal-ai/flux-pro/kontext" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"guidance_scale": 3.5,
6"image_url": "https://v3.fal.media/files/rabbit/rmgBxhwGYb2d3pl3x9sKf_output.png",
7"num_images": 1,
8"output_format": "jpeg",
9"prompt": "Put a donut next to the flour.",
10"safety_tolerance": "2"
11}'
Response
1▼{
2"cancel_url": "https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730/cancel",
3"logs": [],
4"metrics": {},
5"queue_position": 0,
6"request_id": "acf05732-7cb3-445b-9f39-fdaeccb1d730",
7"response_url": "https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730",
8"status": "IN_QUEUE",
9"status_url": "https://queue.fal.run/fal-ai/flux-pro/requests/acf05732-7cb3-445b-9f39-fdaeccb1d730/status"
10}