提交生成视频任务
POST /luma/generations
说明
概览
| Method | POST |
|---|---|
| Path | /luma/generations |
| Type | http |
| Status | 1 |
| Module | 2102810 |
| Folder | 47676852 |
参数
{ "query": [], "path": [], "cookie": [], "header": [ { "id": "NQs7bxnpZf", "name": "Content-Type", "required": true, "description": "", "type": "string", "enable": true, "sampleValue": "application/json" }, { "id": "qb8tEQbCty", "name": "Accept", "required": true, "description": "", "type": "string", "enable": true, "sampleValue": "application/json" }, { "required": true, "description": "", "type": "string", "id": "gBxcCbXhsa", "enable": true, "name": "Authorization", "sampleValue": "Bearer {{YOUR_API_KEY}}" } ] }
请求体
{ "type": "application/json", "parameters": [], "jsonSchema": { "type": "object", "properties": { "user_prompt": { "description": "必传,用户输入的提示词/问题描述", "type": "string" }, "expand_prompt": { "description": "可选,提示词优化开关", "type": "boolean" }, "loop": { "description": "可选,是否循环使用参考图", "type": "boolean" }, "image_url": { "description": "可选,参考图片来源", "type": "string" }, "image_end_url": { "description": "可选,目标关键帧图片", "type": "string" }, "notify_hook": { "description": "可选,处理完成后的回调通知地址", "type": "string" }, "resolution": { "type": "string", "description": "720p或者1080p默认720p\n" }, "duration": { "type": "string", "description": "时长只支持5s\n" }, "model_name": { "type": "string", "description": "ray-v1、 ray-v2 官方显示是 ray1.6 ray2\n" } }, "required": [ "user_prompt", "expand_prompt", "loop", "image_url", "image_end_url", "notify_hook", "resolution", "duration", "model_name" ], "x-apifox-orders": [ "user_prompt", "expand_prompt", "loop", "image_url", "image_end_url", "notify_hook", "resolution", "duration", "model_name" ] }, "mediaType": "", "examples": [ { "value": "{\n \"user_prompt\": \"一阵风吹过树林,使女人的面纱微微飘动。\",\n \"model_name\":\"ray-v2\",\n \"duration\":\"5s\",\n \"resolution\":\"720p\"\n}", "mediaType": "application/json", "description": "" } ], "oasExtensions": "" }
响应
[ { "id": 589857235, "name": "成功", "code": 200, "contentType": "json", "jsonSchema": { "type": "object", "properties": { "code": { "type": "integer" }, "message": { "type": "string" }, "request_id": { "type": "string" }, "data": { "type": "object", "properties": { "task_id": { "type": "string" }, "task_status": { "type": "string" }, "created_at": { "type": "integer" }, "updated_at": { "type": "integer" } }, "required": [ "task_id", "task_status", "created_at", "updated_at" ] } }, "required": [ "code", "message", "request_id", "data" ] }, "itemSchema": {}, "description": "", "mediaType": "", "headers": [], "oasExtensions": "" } ]
响应示例
[ { "name": "成功示例", "responseId": 589857235, "data": "{\r\n \"id\": \"4665a07c-7641-4809-a133-10786201bb56\",\r\n \"prompt\": \"\",\r\n \"state\": \"pending\",\r\n \"queue_state\": null,\r\n \"created_at\": \"2024-12-22T13:38:40.139409Z\",\r\n \"batch_id\": \"\",\r\n \"video\": null,\r\n \"video_raw\": null,\r\n \"liked\": null,\r\n \"estimate_wait_seconds\": null,\r\n \"thumbnail\": null,\r\n \"last_frame\": null\r\n}", "description": "", "oasKey": "", "oasExtensions": "", "id": 457063067 } ]