创建任务 flux-kontext-apps/multi-image-kontext-pro
POST /replicate/v1/models/flux-kontext-apps/multi-image-kontext-pro/predictions
说明
概览
| Method | POST |
|---|---|
| Path | /replicate/v1/models/flux-kontext-apps/multi-image-kontext-pro/predictions |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 62419371 |
参数
{ "query": [], "path": [], "cookie": [], "header": [ { "required": false, "description": "", "type": "string", "id": "GTujCrB2It", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "input": { "type": "object", "properties": { "prompt": { "type": "string", "description": "关于如何组合或转换两个输入图像的文本描述。" }, "aspect_ratio": { "type": "string", "description": "生成图像的长宽比。使用“match_input_image”来匹配输入图像的长宽比。默认值:“match_input_image”" }, "input_image_1": { "type": "string", "description": "第一个输入图像。必须是 jpeg、png、gif 或 webp 格式。" }, "input_image_2": { "type": "string", "description": "第二个输入图像。必须是 jpeg、png、gif 或 webp 格式。" }, "output_format": { "type": "string", "description": "生成图像的输出格式。默认值:“png”。" }, "safety_tolerance": { "type": "integer", "description": "安全容差,0 表示最严格,2 表示最宽松。2 是目前允许的最大值。默认值:2。" } }, "required": [ "prompt", "input_image_1", "input_image_2" ], "x-apifox-orders": [ "prompt", "aspect_ratio", "input_image_1", "input_image_2", "output_format", "safety_tolerance" ] } }, "x-apifox-orders": [ "input" ] }, "mediaType": "", "examples": [ { "value": "{\n \"input\": {\n \"prompt\": \"Put the woman next to the house\",\n \"aspect_ratio\": \"match_input_image\",\n \"input_image_1\": \"https://replicate.delivery/pbxt/N7gRAUNcVF6HarL0hdAQA2JYNMlJD52LP1wyaIWRUXWeHzqT/0_1-1.webp\",\n \"input_image_2\": \"https://replicate.delivery/pbxt/N7gRAK5kbPwdsbOpqgyAIOFQX45U6suTlbL6ws2N74SnGFpo/test.jpg\",\n \"output_format\": \"png\",\n \"safety_tolerance\": 2\n }\n }", "mediaType": "application/json", "description": "" } ], "oasExtensions": "" }
响应
[ { "id": 729622008, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": { "id": { "type": "string" }, "model": { "type": "string" }, "version": { "type": "string" }, "input": { "type": "object", "properties": { "aspect_ratio": { "type": "string" }, "input_image": { "type": "string" }, "output_format": { "type": "string" }, "prompt": { "type": "string" }, "prompt_upsampling": { "type": "boolean" }, "safety_tolerance": { "type": "integer" } }, "required": [ "aspect_ratio", "input_image", "output_format", "prompt", "prompt_upsampling", "safety_tolerance" ] }, "logs": { "type": "string" }, "output": { "type": "null" }, "data_removed": { "type": "boolean" }, "error": { "type": "null" }, "status": { "type": "string" }, "created_at": { "type": "string" }, "urls": { "type": "object", "properties": { "cancel": { "type": "string" }, "get": { "type": "string" }, "stream": { "type": "string" }, "web": { "type": "string" } }, "required": [ "cancel", "get", "stream", "web" ] } }, "required": [ "id", "model", "version", "input", "logs", "output", "data_removed", "error", "status", "created_at", "urls" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]
响应示例
[ { "name": "成功示例", "responseId": 729622008, "data": "{\n \"id\": \"26t3agjpx9rme0crb4es5cbxx4\",\n \"model\": \"flux-kontext-apps/multi-image-kontext-pro\",\n \"version\": \"hidden\",\n \"input\": {\n \"aspect_ratio\": \"match_input_image\",\n \"input_image_1\": \"https://replicate.delivery/pbxt/N7gRAUNcVF6HarL0hdAQA2JYNMlJD52LP1wyaIWRUXWeHzqT/0_1-1.webp\",\n \"input_image_2\": \"https://replicate.delivery/pbxt/N7gRAK5kbPwdsbOpqgyAIOFQX45U6suTlbL6ws2N74SnGFpo/test.jpg\",\n \"output_format\": \"png\",\n \"prompt\": \"Put the woman next to the house\",\n \"safety_tolerance\": 2\n },\n \"logs\": \"\",\n \"output\": null,\n \"data_removed\": false,\n \"error\": null,\n \"status\": \"starting\",\n \"created_at\": \"2025-07-30T02:15:51.786Z\",\n \"urls\": {\n \"cancel\": \"https://api.replicate.com/v1/predictions/26t3agjpx9rme0crb4es5cbxx4/cancel\",\n \"get\": \"https://api.replicate.com/v1/predictions/26t3agjpx9rme0crb4es5cbxx4\",\n \"stream\": \"https://stream.replicate.com/v1/files/bcwr-5cw3763ksezvhhtvt4n5ztxeywdagdmyes4uphs7ud3n65mftzba\",\n \"web\": \"https://replicate.com/p/26t3agjpx9rme0crb4es5cbxx4\"\n }\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 649167956 } ]