创建任务 black-forest-labs/flux-kontext-dev
POST https://aiapi.winfull.top/replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions 官方文档: https://replicate.com/black-forest-labs/flux-kontext-dev
请求参数
Authorization 在 Header 添加参数 Authorization ,其值为在 Bearer 之后拼接 Token 示例: Authorization: Bearer ******************** Header 参数 生成代码 Body 参数application/json 生成代码 示例
{
"input": {
"prompt": "Change the car color to red, turn the headlights on",
"go_fast": true,
"guidance": 2.5,
"input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
"aspect_ratio": "match_input_image",
"output_format": "jpg",
"output_quality": 80,
"num_inference_steps": 30
}
}请求示例代码
Shell JavaScript Java Swift Go PHP Python HTTP C C# Objective-C Ruby OCaml Dart R 请求示例请求示例 Shell JavaScript Java Swift cURLcURL-WindowsHttpiewgetPowerShell
curl --location --request POST 'https://aiapi.winfull.top/replicate/v1/models/black-forest-labs/flux-kontext-dev/predictions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
"prompt": "Change the car color to red, turn the headlights on",
"go_fast": true,
"guidance": 2.5,
"input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
"aspect_ratio": "match_input_image",
"output_format": "jpg",
"output_quality": 80,
"num_inference_steps": 30
}
}'返回响应
🟢200成功 application/json生成代码 Body 生成代码 示例
{
"id": "tpdf40dypdrma0cram394vvzkg",
"model": "black-forest-labs/flux-kontext-dev",
"version": "hidden",
"input": {
"aspect_ratio": "match_input_image",
"go_fast": true,
"guidance": 2.5,
"input_image": "https://replicate.delivery/pbxt/N5YURZv4ifaW2bMwU7hmrwzgtxf99DTQXpBeobLt1O7dEc3h/pexels-jmark-253096.jpg",
"num_inference_steps": 30,
"output_format": "jpg",
"output_quality": 80,
"prompt": "Change the car color to red, turn the headlights on"
},
"logs": "",
"output": null,
"data_removed": false,
"error": null,
"status": "starting",
"created_at": "2025-07-29T07:12:42.163Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tpdf40dypdrma0cram394vvzkg/cancel",
"get": "https://api.replicate.com/v1/predictions/tpdf40dypdrma0cram394vvzkg",
"stream": "https://stream.replicate.com/v1/files/bcwr-6rywfvqq3376h7243k7xrgtnkaqpwiogzgh7kcehtx7kz3nre6fq",
"web": "https://replicate.com/p/tpdf40dypdrma0cram394vvzkg"
}
}修改于 2025-08-07 08:31:16
