"state": "completed" 枚举值: "pending", "processing", "completed", "failed"
GET
/luma/generations/{task_id}查询单个任务
API Key none
请求示例
curl https://top.qingyuntop.ai/luma/generations/{task_id} \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}"请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
task_id | Path | string | 是 | 任务id | 4665a07c-7641-4809-a133-10786201bb56 |
Content-Type | Header | string | 是 | - | application/json |
Accept | Header | string | 是 | - | application/json |
Authorization | Header | string | 是 | - | Bearer {{YOUR_API_KEY}} |
model | JSON body | string | 是 | 使用的模型,可选,默认为 kling-image | - |
prompt | JSON body | string | 是 | 正向提示词,必需,描述你想要生成的图像内容,不能超过500个字符 | - |
negative_prompt | JSON body | string | 是 | 负向提示词,可选,描述你不想在图像中出现的元素,不能超过200个字符 | - |
image | JSON body | string | 是 | 参考图片,可选,支持 Base64 编码或图片 URL,支持 .jpg/.jpeg/.png 格式,大小不能超过 10MB | - |
image_fidelity | JSON body | number | 是 | 参考图片的影响强度,可选,取值范围:0-1,值越大,生成的图像越接近参考图片 | - |
n | JSON body | integer | 是 | 生成图片的数量,可选,取值范围:1-9 | - |
aspect_ratio | JSON body | string | 是 | 生成图片的纵横比,可选,可选值:16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 | - |
callback_url | JSON body | string | 是 | 回调通知地址,可选,当任务状态发生变化时,系统会向这个地址发送通知 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
id | 响应 JSON | string | 是 | - | - |
state | 响应 JSON | string | 是 | - | - |
video | 响应 JSON | object | 是 | - | - |
video.url | 响应 JSON | string | 是 | - | - |
video.width | 响应 JSON | integer | 是 | - | - |
video.height | 响应 JSON | integer | 是 | - | - |
video.download_url | 响应 JSON | string | 是 | - | - |
request | 响应 JSON | object | 是 | - | - |
request.prompt | 响应 JSON | string | 是 | - | - |
request.aspect_ratio | 响应 JSON | string | 是 | - | - |
artifact | 响应 JSON | object | 是 | - | - |
artifact.video | 响应 JSON | object | 是 | - | - |
artifact.video.url | 响应 JSON | string | 是 | - | - |
artifact.video.width | 响应 JSON | integer | 是 | - | - |
artifact.video.height | 响应 JSON | integer | 是 | - | - |
artifact.video.download_url | 响应 JSON | string | 是 | - | - |
artifact.thumbnail | 响应 JSON | object | 是 | - | - |
artifact.thumbnail.url | 响应 JSON | string | 是 | - | - |
artifact.thumbnail.width | 响应 JSON | integer | 是 | - | - |
artifact.thumbnail.height | 响应 JSON | integer | 是 | - | - |
artifact.thumbnail.palette | 响应 JSON | object | 是 | - | - |
artifact.thumbnail.palette.grid | 响应 JSON | string | 是 | - | - |
artifact.thumbnail.media_type | 响应 JSON | string | 是 | - | - |
artifact.video_raw | 响应 JSON | object | 是 | - | - |
artifact.video_raw.url | 响应 JSON | string | 是 | - | - |
artifact.video_raw.width | 响应 JSON | integer | 是 | - | - |
artifact.video_raw.height | 响应 JSON | integer | 是 | - | - |
artifact.video_raw.duration | 响应 JSON | number | 是 | - | - |
artifact.video_raw.media_type | 响应 JSON | string | 是 | - | - |
artifact.created_at | 响应 JSON | string | 是 | - | - |
artifact.last_frame | 响应 JSON | object | 是 | - | - |
artifact.last_frame.url | 响应 JSON | string | 是 | - | - |
artifact.last_frame.width | 响应 JSON | integer | 是 | - | - |
artifact.last_frame.height | 响应 JSON | integer | 是 | - | - |
artifact.last_frame.palette | 响应 JSON | null | 是 | - | - |
artifact.last_frame.media_type | 响应 JSON | string | 是 | - | - |
thumbnail | 响应 JSON | object | 是 | - | - |
thumbnail.url | 响应 JSON | string | 是 | - | - |
thumbnail.width | 响应 JSON | integer | 是 | - | - |
thumbnail.height | 响应 JSON | integer | 是 | - | - |
thumbnail.palette | 响应 JSON | object | 是 | - | - |
thumbnail.palette.grid | 响应 JSON | string | 是 | - | - |
thumbnail.media_type | 响应 JSON | string | 是 | - | - |
video_raw | 响应 JSON | object | 是 | - | - |
video_raw.url | 响应 JSON | string | 是 | - | - |
video_raw.width | 响应 JSON | integer | 是 | - | - |
video_raw.height | 响应 JSON | integer | 是 | - | - |
video_raw.duration | 响应 JSON | number | 是 | - | - |
video_raw.media_type | 响应 JSON | string | 是 | - | - |
created_at | 响应 JSON | string | 是 | - | - |
last_frame | 响应 JSON | object | 是 | - | - |
last_frame.url | 响应 JSON | string | 是 | - | - |
last_frame.width | 响应 JSON | integer | 是 | - | - |
last_frame.height | 响应 JSON | integer | 是 | - | - |
last_frame.palette | 响应 JSON | null | 是 | - | - |
last_frame.media_type | 响应 JSON | string | 是 | - | - |
响应示例
{"id": "4665a07c-7641-4809-a133-10786201bb56", "state": "completed", "video": {"url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4", "width": 1360, "height": 752, "download_url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4"}, "request": {"prompt": "cat dance", "aspect_ratio": "16:9"}, "artifact": {"video": {"url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4", "width": 1360, "height": 752, "download_url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4"}, "thumbnail": {"url": "https://imagedelivery.net/1KomXrSWiTojGGip43n0SQ/e4268de5-4a74-45ff-67b8-dc46df12de00/public", "width": 1360, "height": 752, "palette": {"grid": "em9csKqXYUgqdHVmmqeZLB8YaFpLjVw2bmFTTElBHhMNTzgodD8eVzUeTDorRSkYYEQymV80e1M0ck0ugWVRwKCApWk0hF1BgmVP"}, "media_type": "image"}, "video_raw": {"url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4", "width": 1360, "height": 752, "duration": 5.041667, "media_type": "video"}, "created_at": "0001-01-01T00:00:00Z", "last_frame": {"url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/606108d9-9daf-4265-84fb-595f18240ac5/video_0_last_frame.jpg", "width": 1360, "height": 752, "palette": null, "media_type": "image"}}, "thumbnail": {"url": "https://imagedelivery.net/1KomXrSWiTojGGip43n0SQ/e4268de5-4a74-45ff-67b8-dc46df12de00/public", "width": 1360, "height": 752, "palette": {"grid": "em9csKqXYUgqdHVmmqeZLB8YaFpLjVw2bmFTTElBHhMNTzgodD8eVzUeTDorRSkYYEQymV80e1M0ck0ugWVRwKCApWk0hF1BgmVP"}, "media_type": "image"}, "video_raw": {"url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4", "width": 1360, "height": 752, "duration": 5.041667, "media_type": "video"}, "created_at": "2024-12-22T13:38:40.139Z", "last_frame": {"url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/606108d9-9daf-4265-84fb-595f18240ac5/video_0_last_frame.jpg", "width": 1360, "height": 752, "palette": null, "media_type": "image"}}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899704,
"name": "查询单个任务",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "\"state\": \"completed\" 枚举值: \"pending\", \"processing\", \"completed\", \"failed\"",
"operationId": "",
"sourceUrl": "",
"method": "get",
"path": "/luma/generations/{task_id}",
"tags": [],
"status": 1,
"requestBody": {
"type": "none",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"model": {
"description": "使用的模型,可选,默认为 kling-image",
"type": "string"
},
"prompt": {
"description": "正向提示词,必需,描述你想要生成的图像内容,不能超过500个字符",
"type": "string"
},
"negative_prompt": {
"description": "负向提示词,可选,描述你不想在图像中出现的元素,不能超过200个字符",
"type": "string"
},
"image": {
"description": "参考图片,可选,支持 Base64 编码或图片 URL,支持 .jpg/.jpeg/.png 格式,大小不能超过 10MB",
"type": "string"
},
"image_fidelity": {
"description": "参考图片的影响强度,可选,取值范围:0-1,值越大,生成的图像越接近参考图片",
"type": "number"
},
"n": {
"description": "生成图片的数量,可选,取值范围:1-9",
"type": "integer"
},
"aspect_ratio": {
"description": "生成图片的纵横比,可选,可选值:16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3",
"type": "string"
},
"callback_url": {
"description": "回调通知地址,可选,当任务状态发生变化时,系统会向这个地址发送通知",
"type": "string"
}
},
"required": [
"model",
"prompt",
"negative_prompt",
"image",
"image_fidelity",
"n",
"aspect_ratio",
"callback_url"
],
"x-apifox-orders": [
"model",
"prompt",
"negative_prompt",
"image",
"image_fidelity",
"n",
"aspect_ratio",
"callback_url"
]
},
"examples": [
{
"value": "",
"mediaType": "none",
"description": ""
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [
{
"id": "task_id#0",
"name": "task_id",
"required": true,
"enable": true,
"description": "任务id",
"type": "string",
"sampleValue": "4665a07c-7641-4809-a133-10786201bb56"
}
],
"query": [],
"cookie": [],
"header": [
{
"id": "NQs7bxnpZf",
"name": "Content-Type",
"required": true,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "qb8tEQbCty",
"name": "Accept",
"required": true,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
},
{
"id": "gBxcCbXhsa",
"name": "Authorization",
"required": true,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {},
"responses": [
{
"id": 146909086,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"type": "string"
},
"video": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"download_url": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"download_url"
],
"x-apifox-orders": [
"url",
"width",
"height",
"download_url"
]
},
"request": {
"type": "object",
"properties": {
"prompt": {
"type": "string"
},
"aspect_ratio": {
"type": "string"
}
},
"required": [
"prompt",
"aspect_ratio"
],
"x-apifox-orders": [
"prompt",
"aspect_ratio"
]
},
"artifact": {
"type": "object",
"properties": {
"video": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"download_url": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"download_url"
],
"x-apifox-orders": [
"url",
"width",
"height",
"download_url"
]
},
"thumbnail": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"palette": {
"type": "object",
"properties": {
"grid": {
"type": "string"
}
},
"required": [
"grid"
],
"x-apifox-orders": [
"grid"
]
},
"media_type": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"palette",
"media_type"
],
"x-apifox-orders": [
"url",
"width",
"height",
"palette",
"media_type"
]
},
"video_raw": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"duration": {
"type": "number"
},
"media_type": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"duration",
"media_type"
],
"x-apifox-orders": [
"url",
"width",
"height",
"duration",
"media_type"
]
},
"created_at": {
"type": "string"
},
"last_frame": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"palette": {
"type": "null"
},
"media_type": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"palette",
"media_type"
],
"x-apifox-orders": [
"url",
"width",
"height",
"palette",
"media_type"
]
}
},
"required": [
"video",
"thumbnail",
"video_raw",
"created_at",
"last_frame"
],
"x-apifox-orders": [
"video",
"thumbnail",
"video_raw",
"created_at",
"last_frame"
]
},
"thumbnail": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"palette": {
"type": "object",
"properties": {
"grid": {
"type": "string"
}
},
"required": [
"grid"
],
"x-apifox-orders": [
"grid"
]
},
"media_type": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"palette",
"media_type"
],
"x-apifox-orders": [
"url",
"width",
"height",
"palette",
"media_type"
]
},
"video_raw": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"duration": {
"type": "number"
},
"media_type": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"duration",
"media_type"
],
"x-apifox-orders": [
"url",
"width",
"height",
"duration",
"media_type"
]
},
"created_at": {
"type": "string"
},
"last_frame": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"palette": {
"type": "null"
},
"media_type": {
"type": "string"
}
},
"required": [
"url",
"width",
"height",
"palette",
"media_type"
],
"x-apifox-orders": [
"url",
"width",
"height",
"palette",
"media_type"
]
}
},
"required": [
"id",
"state",
"video",
"request",
"artifact",
"thumbnail",
"video_raw",
"created_at",
"last_frame"
],
"x-apifox-orders": [
"id",
"state",
"video",
"request",
"artifact",
"thumbnail",
"video_raw",
"created_at",
"last_frame"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 146909086,
"data": "{\"id\": \"4665a07c-7641-4809-a133-10786201bb56\", \"state\": \"completed\", \"video\": {\"url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4\", \"width\": 1360, \"height\": 752, \"download_url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4\"}, \"request\": {\"prompt\": \"cat dance\", \"aspect_ratio\": \"16:9\"}, \"artifact\": {\"video\": {\"url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4\", \"width\": 1360, \"height\": 752, \"download_url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4\"}, \"thumbnail\": {\"url\": \"https://imagedelivery.net/1KomXrSWiTojGGip43n0SQ/e4268de5-4a74-45ff-67b8-dc46df12de00/public\", \"width\": 1360, \"height\": 752, \"palette\": {\"grid\": \"em9csKqXYUgqdHVmmqeZLB8YaFpLjVw2bmFTTElBHhMNTzgodD8eVzUeTDorRSkYYEQymV80e1M0ck0ugWVRwKCApWk0hF1BgmVP\"}, \"media_type\": \"image\"}, \"video_raw\": {\"url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4\", \"width\": 1360, \"height\": 752, \"duration\": 5.041667, \"media_type\": \"video\"}, \"created_at\": \"0001-01-01T00:00:00Z\", \"last_frame\": {\"url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/606108d9-9daf-4265-84fb-595f18240ac5/video_0_last_frame.jpg\", \"width\": 1360, \"height\": 752, \"palette\": null, \"media_type\": \"image\"}}, \"thumbnail\": {\"url\": \"https://imagedelivery.net/1KomXrSWiTojGGip43n0SQ/e4268de5-4a74-45ff-67b8-dc46df12de00/public\", \"width\": 1360, \"height\": 752, \"palette\": {\"grid\": \"em9csKqXYUgqdHVmmqeZLB8YaFpLjVw2bmFTTElBHhMNTzgodD8eVzUeTDorRSkYYEQymV80e1M0ck0ugWVRwKCApWk0hF1BgmVP\"}, \"media_type\": \"image\"}, \"video_raw\": {\"url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4\", \"width\": 1360, \"height\": 752, \"duration\": 5.041667, \"media_type\": \"video\"}, \"created_at\": \"2024-12-22T13:38:40.139Z\", \"last_frame\": {\"url\": \"https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/606108d9-9daf-4265-84fb-595f18240ac5/video_0_last_frame.jpg\", \"width\": 1360, \"height\": 752, \"palette\": null, \"media_type\": \"image\"}}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fc09b-0b1c-71af-bbc9-cbde010bdd37"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436131,
"ordering": 0,
"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.146909086"
],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}