flux-2-pro
Method: POSTEndpoint: /bfl/v1/flux-2-pro
This section contains endpoint-specific behavior, parameters, or usage notes for this API. Official Documentation: https://docs.bfl.ai/api-reference/tasks/generate-or-edit-an-image-with-flux2-[pro]
This section contains endpoint-specific behavior, parameters, or usage notes for this API. https://bfl.ai/pricing
Request Parameters
Header Parameters
text
Content-Type
string
Required
Example:
application/json
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}Body Parameters application/json
text
prompt_upsampling
boolean
Optional
prompt
string
Required
seed
integer
Optional
width
integer
Optional
height
integer
Optional
safety_tolerance
integer
Optional
output_format
string
Optional
Example
{
"prompt_upsampling"
:
true
,
"prompt"
:
"Draw a cat"
,
"seed"
:
42
,
"width"
:
65
,
"height"
:
65
,
"safety_tolerance"
:
2
,
"output_format"
:
"jpeg"
}Example Request
Shell
bash
curl --location --request POST '/bfl/v1/flux-2-pro' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt_upsampling": true,
"prompt": "Draw a cat",
"seed": 42,
"width": 65,
"height": 65,
"safety_tolerance": 2,
"output_format": "jpeg"
}'Response
🟢 200 Success
Content Type: application/json
Response Schema
text
id
string
Required
polling_url
string
Required
cost
integer
Required
input_mp
integer
Required
output_mp
integer
RequiredExample
json
{"id":"d5ba37dc-ba09-4658-852e-deea7e176439","polling_url":"https://api.eu2.bfl.ai/v1/get_result?id=d5ba37dc-ba09-4658-852e-deea7e176439","cost":3.0,"input_mp":0.0,"output_mp":0.0}