我们增加了sync参数,支持同步返回结果,方便调试
curl --location --request POST 'https://api.302.ai/flux/v1/flux-2-pro' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "ein fantastisches bild",
"width": 1024,
"height": 768,
"steps": 40,
"prompt_upsampling": false,
"seed": 42,
"guidance": 2.5,
"safety_tolerance": 2,
"interval": 2,
"output_format": "jpeg",
"sync": true
}'{
"id": "7af93a33-10aa-45be-b511-e3ab4d74e259",
"polling_url": "https://api.us2.bfl.ai/v1/get_result?id=7af93a33-10aa-45be-b511-e3ab4d74e259",
"cost": 3.0,
"input_mp": 0.0,
"output_mp": 0.75
}