Skip to content
EN

创建任务-black-forest-labs/flux-pro

方法: POST路径: /replicate/v1/models/black-forest-labs/flux-pro/predictions

https://replicate.com/black-forest-labs/flux-pro?input=http

请求参数

Header 参数

text
Content-Type
string
必需
示例:
application/json
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}

Body 参数 application/json

text
input
object
必需
prompt
string
必需
go_fast
boolean
可选
megapixels
string
可选
num_outputs
integer
可选
aspect_ratio
string
默认1:1
可选
output_format
string
可选
output_quality
integer
可选
num_inference_steps
integer
可选
示例
{
"input"
:
{
"steps"
:
25
,
"width"
:
1024
,
"height"
:
1024
,
"prompt"
:
"The world\\'s largest black forest cake, the size of a building, surrounded by trees of the black forest"
,
"guidance"
:
3
,
"interval"
:
2
,
"aspect_ratio"
:
"1:1"
,
"output_format"
:
"webp"
,
"output_quality"
:
80
,
"safety_tolerance"
:
2
,
"prompt_upsampling"
:
false
}
}

请求示例代码

Shell

bash
curl --location --request POST '/replicate/v1/models/black-forest-labs/flux-pro/predictions' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
      "steps": 25,
      "width": 1024,
      "height": 1024,
      "prompt": "The world\\'\''s largest black forest cake, the size of a building, surrounded by trees of the black forest",
      "guidance": 3,
      "interval": 2,
      "aspect_ratio": "1:1",
      "output_format": "webp",
      "output_quality": 80,
      "safety_tolerance": 2,
      "prompt_upsampling": false
    }
  }'

返回响应

🟢 200 成功

内容类型: application/json

响应结构

text
object

示例

json
{}