官方文档:https://replicate.com/flux-kontext-apps/multi-image-kontext-max
POST
/replicate/v1/models/flux-kontext-apps/multi-image-kontext-max/predictions创建任务 flux-kontext-apps/multi-image-kontext-max
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/replicate/v1/models/flux-kontext-apps/multi-image-kontext-max/predictions \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"input": {
"prompt": "Put the woman into a white t-shirt with the text on it",
"aspect_ratio": "1:1",
"input_image_1": "https://replicate.delivery/pbxt/N5rSeJrCafWpmJuLb62moY8pSMEpSBBwSf7N6hxyIn4fNYMa/w8msa88d01rm80cq3hzsqrdehg.png",
"input_image_2": "https://replicate.delivery/pbxt/N5rSdTCgBqIRvbkedcfLfS5xTSEEOqMtX9FsR1hLK9JYryml/0_1.webp",
"output_format": "png",
"safety_tolerance": 2
}
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
input | JSON body | object | 否 | - | - |
input.prompt | JSON body | string | 是 | 关于如何组合或转换两个输入图像的文本描述。 | - |
input.aspect_ratio | JSON body | string | 否 | 生成图像的长宽比。使用“match_input_image”来匹配输入图像的长宽比。默认值:“match_input_image” | - |
input.input_image_1 | JSON body | string | 是 | 第一个输入图像。必须是 jpeg、png、gif 或 webp 格式。 | - |
input.input_image_2 | JSON body | string | 是 | 第二个输入图像。必须是 jpeg、png、gif 或 webp 格式。 | - |
input.output_format | JSON body | string | 否 | 生成图像的输出格式。默认值:“png”。 | - |
input.safety_tolerance | JSON body | integer | 否 | 安全容差,0 表示最严格,2 表示最宽松。2 是目前允许的最大值。默认值:2 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
id | 响应 JSON | string | 是 | - | - |
model | 响应 JSON | string | 是 | - | - |
version | 响应 JSON | string | 是 | - | - |
input | 响应 JSON | object | 是 | - | - |
input.aspect_ratio | 响应 JSON | string | 是 | - | - |
input.input_image_1 | 响应 JSON | string | 是 | - | - |
input.input_image_2 | 响应 JSON | string | 是 | - | - |
input.output_format | 响应 JSON | string | 是 | - | - |
input.prompt | 响应 JSON | string | 是 | - | - |
input.safety_tolerance | 响应 JSON | integer | 是 | - | - |
logs | 响应 JSON | string | 是 | - | - |
output | 响应 JSON | null | 是 | - | - |
data_removed | 响应 JSON | boolean | 是 | - | - |
error | 响应 JSON | null | 是 | - | - |
status | 响应 JSON | string | 是 | - | - |
created_at | 响应 JSON | string | 是 | - | - |
urls | 响应 JSON | object | 是 | - | - |
urls.cancel | 响应 JSON | string | 是 | - | - |
urls.get | 响应 JSON | string | 是 | - | - |
urls.stream | 响应 JSON | string | 是 | - | - |
urls.web | 响应 JSON | string | 是 | - | - |
响应示例
{
"id": "b6k38vmb01rme0crb4bbr2apw4",
"model": "flux-kontext-apps/multi-image-kontext-max",
"version": "hidden",
"input": {
"aspect_ratio": "1:1",
"input_image_1": "https://replicate.delivery/pbxt/N5rSeJrCafWpmJuLb62moY8pSMEpSBBwSf7N6hxyIn4fNYMa/w8msa88d01rm80cq3hzsqrdehg.png",
"input_image_2": "https://replicate.delivery/pbxt/N5rSdTCgBqIRvbkedcfLfS5xTSEEOqMtX9FsR1hLK9JYryml/0_1.webp",
"output_format": "png",
"prompt": "Put the woman into a white t-shirt with the text on it",
"safety_tolerance": 2
},
"logs": "",
"output": null,
"data_removed": false,
"error": null,
"status": "starting",
"created_at": "2025-07-30T02:08:26.368Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/b6k38vmb01rme0crb4bbr2apw4/cancel",
"get": "https://api.replicate.com/v1/predictions/b6k38vmb01rme0crb4bbr2apw4",
"stream": "https://stream.replicate.com/v1/files/bcwr-4lncowbqyyr5toyxguv6tr47ffpade3muguvemzik5let3hnlryq",
"web": "https://replicate.com/p/b6k38vmb01rme0crb4bbr2apw4"
}
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899853,
"name": "创建任务 flux-kontext-apps/multi-image-kontext-max",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [
{
"type": "customScript",
"data": "// 将接口返回数据,封装成自己需要的结构\r\nvar resp = {\r\n response: pm.response.json().data[0].url\r\n}\r\n\r\n// html 模板字符\r\nvar template = `<html><img src=\"{{response}}\" /></html>`;\r\n\r\n// 设置 visualizer 数据。传模板、解析对象。\r\npm.visualizer.set(template, resp);",
"defaultEnable": true,
"enable": true,
"id": "Fot2xNyFK7A2TnGkFZqi0910wmjnR1Es"
}
],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档:https://replicate.com/flux-kontext-apps/multi-image-kontext-max",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/replicate/v1/models/flux-kontext-apps/multi-image-kontext-max/predictions",
"tags": [],
"status": 1,
"requestBody": {
"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"
]
},
"examples": [
{
"value": "{\n \"input\": {\n \"prompt\": \"Put the woman into a white t-shirt with the text on it\",\n \"aspect_ratio\": \"1:1\",\n \"input_image_1\": \"https://replicate.delivery/pbxt/N5rSeJrCafWpmJuLb62moY8pSMEpSBBwSf7N6hxyIn4fNYMa/w8msa88d01rm80cq3hzsqrdehg.png\",\n \"input_image_2\": \"https://replicate.delivery/pbxt/N5rSdTCgBqIRvbkedcfLfS5xTSEEOqMtX9FsR1hLK9JYryml/0_1.webp\",\n \"output_format\": \"png\",\n \"safety_tolerance\": 2\n }\n }",
"mediaType": "application/json",
"description": ""
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "GTujCrB2It",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {},
"responses": [
{
"id": 139748687,
"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_1": {
"type": "string"
},
"input_image_2": {
"type": "string"
},
"output_format": {
"type": "string"
},
"prompt": {
"type": "string"
},
"safety_tolerance": {
"type": "integer"
}
},
"required": [
"aspect_ratio",
"input_image_1",
"input_image_2",
"output_format",
"prompt",
"safety_tolerance"
],
"x-apifox-orders": [
"aspect_ratio",
"input_image_1",
"input_image_2",
"output_format",
"prompt",
"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"
],
"x-apifox-orders": [
"cancel",
"get",
"stream",
"web"
]
}
},
"required": [
"id",
"model",
"version",
"input",
"logs",
"output",
"data_removed",
"error",
"status",
"created_at",
"urls"
],
"x-apifox-orders": [
"id",
"model",
"version",
"input",
"logs",
"output",
"data_removed",
"error",
"status",
"created_at",
"urls"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 139748687,
"data": "{\n \"id\": \"b6k38vmb01rme0crb4bbr2apw4\",\n \"model\": \"flux-kontext-apps/multi-image-kontext-max\",\n \"version\": \"hidden\",\n \"input\": {\n \"aspect_ratio\": \"1:1\",\n \"input_image_1\": \"https://replicate.delivery/pbxt/N5rSeJrCafWpmJuLb62moY8pSMEpSBBwSf7N6hxyIn4fNYMa/w8msa88d01rm80cq3hzsqrdehg.png\",\n \"input_image_2\": \"https://replicate.delivery/pbxt/N5rSdTCgBqIRvbkedcfLfS5xTSEEOqMtX9FsR1hLK9JYryml/0_1.webp\",\n \"output_format\": \"png\",\n \"prompt\": \"Put the woman into a white t-shirt with the text on it\",\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:08:26.368Z\",\n \"urls\": {\n \"cancel\": \"https://api.replicate.com/v1/predictions/b6k38vmb01rme0crb4bbr2apw4/cancel\",\n \"get\": \"https://api.replicate.com/v1/predictions/b6k38vmb01rme0crb4bbr2apw4\",\n \"stream\": \"https://stream.replicate.com/v1/files/bcwr-4lncowbqyyr5toyxguv6tr47ffpade3muguvemzik5let3hnlryq\",\n \"web\": \"https://replicate.com/p/b6k38vmb01rme0crb4bbr2apw4\"\n }\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fc09b-0b2c-736b-8edb-90c04a03ac46"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436086,
"ordering": 126,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {},
"isDefaultUrlEncoding": 1
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [
"BLANK.139748687"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}