官方文档: https://replicate.com/black-forest-labs/flux-kontext-max
GET
/replicate/v1/predictions/{任务id}查询任务
API Key none
请求示例
curl https://top.qingyuntop.ai/replicate/v1/predictions/{任务id} \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}"请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
任务id | Path | string | 是 | - | w44zs9cet5rmc0cqzp49gpkhf8 |
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
prompt | JSON body | string | 是 | 所需图像的文本描述。最大长度为 1000 个字符。 | - |
model | JSON body | string | 否 | 用于图像生成的模型。 | - |
n | JSON body | integer | 否 | 要生成的图像数。必须介于 1 和 10 之间。 | - |
quality | JSON body | string | 否 | 将生成的图像的质量。`hd`创建具有更精细细节和更高一致性的图像。此参数仅支持`dall-e-3`. | - |
response_format | JSON body | string | 否 | 返回生成的图像的格式。必须是 或url之一b64_json。 | - |
style | JSON body | string | 否 | 风格 | - |
user | JSON body | string | 否 | 生成图像的风格。必须是 或`vivid`之一`natural`。生动使模型倾向于生成超真实和戏剧性的图像。自然使模型生成更自然、不太真实的图像。此参数仅支持`dall-e-3`. | - |
size | JSON body | string | 否 | 生成图像的大小。必须是256x256、512x512或 1024x1024之一。 | - |
aspect_ratio | JSON body | string | 是 | 图片比例: 枚举值Possible enum values: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
id | 响应 JSON | string | 是 | - | - |
logs | 响应 JSON | string | 是 | - | - |
urls | 响应 JSON | object | 是 | - | - |
urls.get | 响应 JSON | string | 是 | - | - |
urls.web | 响应 JSON | string | 是 | - | - |
urls.cancel | 响应 JSON | string | 是 | - | - |
urls.stream | 响应 JSON | string | 是 | - | - |
error | 响应 JSON | null | 是 | - | - |
input | 响应 JSON | object | 是 | - | - |
input.prompt | 响应 JSON | string | 是 | - | - |
input.input_image | 响应 JSON | string | 是 | - | - |
input.aspect_ratio | 响应 JSON | string | 是 | - | - |
input.output_format | 响应 JSON | string | 是 | - | - |
input.safety_tolerance | 响应 JSON | integer | 是 | - | - |
input.prompt_upsampling | 响应 JSON | boolean | 是 | - | - |
model | 响应 JSON | string | 是 | - | - |
output | 响应 JSON | string | 是 | - | - |
status | 响应 JSON | string | 是 | - | - |
metrics | 响应 JSON | object | 是 | - | - |
metrics.image_count | 响应 JSON | integer | 是 | - | - |
metrics.predict_time | 响应 JSON | number | 是 | - | - |
version | 响应 JSON | string | 是 | - | - |
created_at | 响应 JSON | string | 是 | - | - |
started_at | 响应 JSON | string | 是 | - | - |
completed_at | 响应 JSON | string | 是 | - | - |
data_removed | 响应 JSON | boolean | 是 | - | - |
响应示例
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 497673327,
"name": "查询任务",
"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": "C2kaeXey29CLwskBQvv1nDOEjPJHCQh2"
}
],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档: https://replicate.com/black-forest-labs/flux-kontext-max",
"operationId": "",
"sourceUrl": "",
"method": "get",
"path": "/replicate/v1/predictions/{任务id}",
"tags": [],
"status": 1,
"requestBody": {
"type": "none",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "用于图像生成的模型。"
},
"prompt": {
"type": "string",
"description": "所需图像的文本描述。最大长度为 1000 个字符。"
},
"n": {
"type": "integer",
"description": "要生成的图像数。必须介于 1 和 10 之间。"
},
"size": {
"type": "string",
"description": "生成图像的大小。必须是256x256、512x512或 1024x1024之一。"
},
"quality": {
"type": "string",
"description": "将生成的图像的质量。`hd`创建具有更精细细节和更高一致性的图像。此参数仅支持`dall-e-3`."
},
"response_format": {
"type": "string",
"description": "返回生成的图像的格式。必须是 或url之一b64_json。"
},
"style": {
"type": "string",
"description": "风格"
},
"user": {
"type": "string",
"description": "生成图像的风格。必须是 或`vivid`之一`natural`。生动使模型倾向于生成超真实和戏剧性的图像。自然使模型生成更自然、不太真实的图像。此参数仅支持`dall-e-3`."
},
"aspect_ratio": {
"type": "string",
"description": "图片比例: 枚举值Possible enum values: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21",
"x-apifox-mock": "1:1"
}
},
"required": [
"prompt",
"aspect_ratio"
],
"x-apifox-orders": [
"prompt",
"model",
"n",
"quality",
"response_format",
"style",
"user",
"size",
"aspect_ratio"
]
},
"examples": [
{
"value": "",
"mediaType": "application/json",
"description": ""
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [
{
"id": "任务id#0",
"name": "任务id",
"required": true,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "w44zs9cet5rmc0cqzp49gpkhf8"
}
],
"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": 125027580,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"logs": {
"type": "string"
},
"urls": {
"type": "object",
"properties": {
"get": {
"type": "string"
},
"web": {
"type": "string"
},
"cancel": {
"type": "string"
},
"stream": {
"type": "string"
}
},
"required": [
"get",
"web",
"cancel",
"stream"
],
"x-apifox-orders": [
"get",
"web",
"cancel",
"stream"
]
},
"error": {
"type": "null"
},
"input": {
"type": "object",
"properties": {
"prompt": {
"type": "string"
},
"input_image": {
"type": "string"
},
"aspect_ratio": {
"type": "string"
},
"output_format": {
"type": "string"
},
"safety_tolerance": {
"type": "integer"
},
"prompt_upsampling": {
"type": "boolean"
}
},
"required": [
"prompt",
"input_image",
"aspect_ratio",
"output_format",
"safety_tolerance",
"prompt_upsampling"
],
"x-apifox-orders": [
"prompt",
"input_image",
"aspect_ratio",
"output_format",
"safety_tolerance",
"prompt_upsampling"
]
},
"model": {
"type": "string"
},
"output": {
"type": "string"
},
"status": {
"type": "string"
},
"metrics": {
"type": "object",
"properties": {
"image_count": {
"type": "integer"
},
"predict_time": {
"type": "number"
}
},
"required": [
"image_count",
"predict_time"
],
"x-apifox-orders": [
"image_count",
"predict_time"
]
},
"version": {
"type": "string"
},
"created_at": {
"type": "string"
},
"started_at": {
"type": "string"
},
"completed_at": {
"type": "string"
},
"data_removed": {
"type": "boolean"
}
},
"required": [
"id",
"logs",
"urls",
"error",
"input",
"model",
"output",
"status",
"metrics",
"version",
"created_at",
"started_at",
"completed_at",
"data_removed"
],
"x-apifox-orders": [
"id",
"logs",
"urls",
"error",
"input",
"model",
"output",
"status",
"metrics",
"version",
"created_at",
"started_at",
"completed_at",
"data_removed"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "Create image",
"responseId": 125027580,
"data": "{\n \"created\": 1589478378,\n \"data\": [\n {\n \"url\": \"https://...\"\n },\n {\n \"url\": \"https://...\"\n }\n ]\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4be5-7428-af98-9901e6b0858b"
},
{
"name": "成功示例",
"responseId": 125027580,
"data": "{\r\n \"id\": \"w44zs9cet5rmc0cqzp49gpkhf8\",\r\n \"logs\": \"Starting generate image\\nUsing seed: 29889\\nTotal safe images: 1 out of 1\\ngenerate image took 3.53 seconds\\n\",\r\n \"urls\": {\r\n \"get\": \"https://api.replicate.com/v1/predictions/w44zs9cet5rmc0cqzp49gpkhf8\",\r\n \"web\": \"https://replicate.com/p/w44zs9cet5rmc0cqzp49gpkhf8\",\r\n \"cancel\": \"https://api.replicate.com/v1/predictions/w44zs9cet5rmc0cqzp49gpkhf8/cancel\",\r\n \"stream\": \"https://stream.replicate.com/v1/files/bcwr-h7bu76ujftxzwih5u35puoysogps56mqvpvjz4nrxskhfe7ks42a\"\r\n },\r\n \"error\": null,\r\n \"input\": {\r\n \"prompt\": \"Make the letters 3D, floating in space on a city street\",\r\n \"input_image\": \"https://replicate.delivery/xezq/XfwWjHJ7HfrmXE6ukuLVEpXWfeQ3PQeRI5mApuLXRxST7XMmC/tmpc91tlq20.png\",\r\n \"aspect_ratio\": \"match_input_image\",\r\n \"output_format\": \"jpg\",\r\n \"safety_tolerance\": 2,\r\n \"prompt_upsampling\": false\r\n },\r\n \"model\": \"black-forest-labs/flux-kontext-dev\",\r\n \"output\": \"https://replicate.delivery/xezq/FB7iNUmvHJ4NHFIMPea2hEoa4N4mTbwf3GBQjGzGQ4yeD4fTB/output.jpg\",\r\n \"status\": \"succeeded\",\r\n \"metrics\": {\r\n \"image_count\": 1,\r\n \"predict_time\": 3.590520183\r\n },\r\n \"version\": \"hidden\",\r\n \"created_at\": \"2025-07-12T07:27:54.577Z\",\r\n \"started_at\": \"2025-07-12T07:27:54.587120975Z\",\r\n \"completed_at\": \"2025-07-12T07:27:58.177641162Z\",\r\n \"data_removed\": false\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fd25e-4be5-7428-af98-9c755874cca9"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92749334,
"ordering": 6,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {},
"isDefaultUrlEncoding": 1
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-05T14:40:23.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [
"BLANK.125027580"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}