POST /fal-ai/flux-pro/kontext/text-to-image
Method: POSTEndpoint: /fal-ai/flux-pro/kontext/text-to-image
This section contains endpoint-specific behavior, parameters, or usage notes for this API.
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
// provider-specific example normalized for English documentation
Required
Example:
// provider-specific example normalized for English documentation
seed
integer
Optional
// provider-specific example normalized for English documentation
guidance_scale
number
Optional
// provider-specific example normalized for English documentation
sync_mode
boolean
Optional
// provider-specific example normalized for English documentation
Default Value:
false
num_images
integer
Optional
// provider-specific example normalized for English documentation
>= 1
<= 4
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"
:
// provider-specific example normalized for English documentation
,
"guidance_scale"
:
3.5
,
"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/text-to-image' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "Example prompt from provider documentation.",
"guidance_scale": 3.5,
"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
RequiredExample
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
}