创建任务-flux-dev
方法: POST路径: /bfl/v1/flux-dev
请求参数
Header 参数
text
Content-Type
string
必需
示例:
application/json
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 application/json
text
prompt
string
必需
width
integer
必需
height
integer
必需
steps
integer
必需
prompt_upsampling
boolean
必需
seed
integer
必需
guidance
integer
必需
safety_tolerance
integer
必需
output_format
string
必需
示例
{
"prompt"
:
"string"
,
"width"
:
0
,
"height"
:
0
,
"steps"
:
0
,
"prompt_upsampling"
:
true
,
"seed"
:
0
,
"guidance"
:
0
,
"safety_tolerance"
:
0
,
"output_format"
:
"string"
}请求示例代码
Shell
bash
curl --location --request POST '/bfl/v1/flux-dev' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"prompt": "string",
"width": 0,
"height": 0,
"steps": 0,
"prompt_upsampling": true,
"seed": 0,
"guidance": 0,
"safety_tolerance": 0,
"output_format": "string"
}'返回响应
🟢 200 成功
内容类型: application/json
响应结构
text
id
string
必需
polling_url
string
必需示例
json
{"id":"b9b172a8-e39c-47b2-8f1a-cb8925f3532e","polling_url":"https://api.us1.bfl.ai/v1/get_result?id=b9b172a8-e39c-47b2-8f1a-cb8925f3532e"}