{ "name": "quickly-video-query", "displayName": "一键成片 - 查询生成结果", "description": "通过 Parse 云函数查询 Quickly 一键成片任务的视频生成结果。用于轮询等待 AI 视频生成完成,返回视频URL/封面URL/时长列表。", "category": "video-creation", "version": "1.0.0", "endpoint": { "method": "POST", "url": "https://server.fmode.cn/api/functions", "headers": { "Content-Type": "application/json" } }, "parameters": { "type": "object", "required": ["taskId"], "properties": { "taskId": { "type": "string", "description": "quickly-video-create 返回的 task_id,用于查询对应任务的视频生成结果" } } }, "requestTransform": { "description": "通过 Parse 云函数查询,固定传入云函数ID和action", "body": { "id": "sWvRr8RvPT", "_ApplicationId": "ncloudmaster", "action": "query", "taskId": "{{taskId}}" } }, "response": { "type": "object", "description": "视频生成结果", "properties": { "code": { "type": "integer", "description": "200 = 成功" }, "success": { "type": "boolean", "description": "true = 数据有效" }, "data": { "type": "array", "description": "视频结果列表,生成中时为空数组", "items": { "type": "object", "properties": { "objectId": { "type": "string", "description": "视频记录唯一ID(用于 recordDownload 接口)" }, "taskId": { "type": "string", "description": "对应的任务ID" }, "preId": { "type": "string", "description": "预定视频ID(对应创建任务时传入的 pre_id)" }, "coverUrl": { "type": "string", "description": "视频封面图URL" }, "videoUrl": { "type": "string", "description": "视频播放/下载URL(mp4格式)" }, "videoName": { "type": "string", "description": "视频名称" }, "videoDuration": { "type": "number", "description": "视频时长(秒)" }, "status": { "type": "string", "description": "始终为 success(云函数 query 只返回 status='success' 的记录)" }, "createdAt": { "type": "string", "description": "视频生成时间(ISO 8601)" } } } } } }, "pollingConfig": { "interval": 15000, "maxAttempts": 40, "successCondition": "data.length > 0", "stillPendingCondition": "data.length === 0 (cloud function only returns status='success' records; empty = still processing or failed)", "timeoutAction": "轮询超时40次仍无结果,通常表示生成失败(素材URL不可达、格式不支持、Quickly 服务异常等)" }, "usageExamples": [ { "name": "查询视频生成结果", "input": { "taskId": "987654321" }, "description": "轮询查询任务 987654321 的视频生成结果", "expectedOutput": { "code": 200, "success": true, "data": [ { "objectId": "abc123", "taskId": "987654321", "preId": "1711234567890", "coverUrl": "https://cdn.kuaizi.co/covers/xxx.jpg", "videoUrl": "https://cdn.kuaizi.co/videos/xxx.mp4", "videoName": "推拉门_极简风格", "videoDuration": 15, "status": "success" } ] } } ], "timeout": 15000, "retry": { "maxAttempts": 1, "delay": 0 } }