Skip to content
中文

FLUX.1 Kontext [Pro]

Method: POSTEndpoint: /fal-ai/flux-pro/kontext

Text description used to generate the image (required)

Request Parameters

Header Parameters

text
Content-Type
string
Optional
Example:
application/json
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}

Body Parameters application/json

text
prompt
string
Required
Text description used to generate the image (required)
seed
integer
Optional
  // provider-specific example normalized for English documentation
guidance_scale
number
Optional
  // provider-specific example normalized for English documentation
Default Value:
3.5
sync_mode
boolean
Optional
  // provider-specific example normalized for English documentation
num_images
integer
Optional
  // provider-specific example normalized for English documentation
Default Value:
1
safety_tolerance
enum<string>
Optional
  // provider-specific example normalized for English documentation
Enum Values:
1
2
3
4
5
6
Default Value:
2
output_format
enum<string>
Optional
  // provider-specific example normalized for English documentation
Enum Values:
jpeg
png
Default Value:
jpeg
aspect_ratio
enum<string>
Optional
  // provider-specific example normalized for English documentation
Enum Values:
21:9
16:9
4:3
3:2
1:1
2:3
3:4
9:16
9:21
Default Value:
1:1
Example
{
"prompt"
:
"string"
,
"seed"
:
0
,
"guidance_scale"
:
3.5
,
"sync_mode"
:
true
,
"num_images"
:
1
,
"safety_tolerance"
:
"2"
,
"output_format"
:
"jpeg"
,
"aspect_ratio"
:
"1:1"
}

Example Request

Shell

bash
curl --location --request POST '/fal-ai/flux-pro/kontext' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "prompt": "string",
    "seed": 0,
    "guidance_scale": 3.5,
    "sync_mode": true,
    "num_images": 1,
    "safety_tolerance": "2",
    "output_format": "jpeg",
    "aspect_ratio": "1:1"
}'

Response

🟢 200 Success

Content Type: application/json

Response Schema

text
status
string
Required
request_id
string
Required
response_url
string
Required
status_url
string
Required
cancel_url
string
Required
queue_position
integer
Required

Example

json
{
    "status": "IN_QUEUE",
    "request_id": "551a32da-52b2-4be8-bf2f-bfb7cce2b324",
    "response_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324",
    "status_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324/status",
    "cancel_url": "https://queue.fal.run/fal-ai/flux-1/requests/551a32da-52b2-4be8-bf2f-bfb7cce2b324/cancel",
    "queue_position": 0
}