|
|
@@ -5,10 +5,11 @@
|
|
|
"category": "video-creation",
|
|
|
"version": "1.0.0",
|
|
|
"type": "orchestration",
|
|
|
-
|
|
|
"parameters": {
|
|
|
"type": "object",
|
|
|
- "required": ["transcript"],
|
|
|
+ "required": [
|
|
|
+ "transcript"
|
|
|
+ ],
|
|
|
"properties": {
|
|
|
"transcript": {
|
|
|
"type": "string",
|
|
|
@@ -21,31 +22,47 @@
|
|
|
},
|
|
|
"videoModel": {
|
|
|
"type": "string",
|
|
|
- "enum": ["720p", "1080p", "pro"],
|
|
|
+ "enum": [
|
|
|
+ "720p",
|
|
|
+ "1080p",
|
|
|
+ "pro"
|
|
|
+ ],
|
|
|
"description": "瑙嗛鐢熸垚妯″瀷璐ㄩ噺绛夌骇",
|
|
|
"default": "720p"
|
|
|
},
|
|
|
"videoMethod": {
|
|
|
"type": "string",
|
|
|
- "enum": ["text2video", "img2video"],
|
|
|
+ "enum": [
|
|
|
+ "text2video",
|
|
|
+ "img2video"
|
|
|
+ ],
|
|
|
"description": "text2video=纯文生视频(更快),img2video=先生成图片再图生视频(效果更可控)",
|
|
|
"default": "text2video"
|
|
|
},
|
|
|
"aspectRatio": {
|
|
|
"type": "string",
|
|
|
- "enum": ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"],
|
|
|
+ "enum": [
|
|
|
+ "16:9",
|
|
|
+ "9:16",
|
|
|
+ "1:1",
|
|
|
+ "4:3",
|
|
|
+ "3:4",
|
|
|
+ "21:9"
|
|
|
+ ],
|
|
|
"description": "瑙嗛鐢婚潰姣斾緥",
|
|
|
"default": "16:9"
|
|
|
},
|
|
|
"frames": {
|
|
|
"type": "integer",
|
|
|
- "enum": [121, 241],
|
|
|
+ "enum": [
|
|
|
+ 121,
|
|
|
+ 241
|
|
|
+ ],
|
|
|
"description": "视频帧数,121=5秒,241=10秒",
|
|
|
"default": 121
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
"pipeline": [
|
|
|
{
|
|
|
"step": 1,
|
|
|
@@ -122,7 +139,9 @@
|
|
|
"id": "2b-2",
|
|
|
"name": "杞鍥剧墖缁撴灉",
|
|
|
"skill": "jimeng/jimeng-task-query",
|
|
|
- "dependsOn": ["2b-1"],
|
|
|
+ "dependsOn": [
|
|
|
+ "2b-1"
|
|
|
+ ],
|
|
|
"input": {
|
|
|
"workId": "${imageWorkIds[segment.id]}",
|
|
|
"routerName": "getImgV4"
|
|
|
@@ -137,7 +156,9 @@
|
|
|
"id": "2b-3",
|
|
|
"name": "鑾峰彇鍥剧墖URL",
|
|
|
"skill": "jimeng/jimeng-work-result",
|
|
|
- "dependsOn": ["2b-2"],
|
|
|
+ "dependsOn": [
|
|
|
+ "2b-2"
|
|
|
+ ],
|
|
|
"input": {
|
|
|
"workId": "${imageWorkIds[segment.id]}"
|
|
|
},
|
|
|
@@ -148,13 +169,17 @@
|
|
|
"id": "2b-4",
|
|
|
"name": "鍥剧敓瑙嗛锛堥甯э級",
|
|
|
"skill": "jimeng/jimeng-video-v3-720p",
|
|
|
- "dependsOn": ["2b-3"],
|
|
|
+ "dependsOn": [
|
|
|
+ "2b-3"
|
|
|
+ ],
|
|
|
"input": {
|
|
|
"prompt": "${segment.prompt}",
|
|
|
"method": "2",
|
|
|
"frames": "${frames}",
|
|
|
"config": {
|
|
|
- "image_urls": ["${imageUrls[segment.id]}"]
|
|
|
+ "image_urls": [
|
|
|
+ "${imageUrls[segment.id]}"
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
"output": "workIds[${segment.id}]"
|
|
|
@@ -193,7 +218,9 @@
|
|
|
"id": "3b",
|
|
|
"name": "鑾峰彇瑙嗛URL",
|
|
|
"skill": "jimeng/jimeng-work-result",
|
|
|
- "dependsOn": ["3a"],
|
|
|
+ "dependsOn": [
|
|
|
+ "3a"
|
|
|
+ ],
|
|
|
"input": {
|
|
|
"workId": "${workId}"
|
|
|
},
|
|
|
@@ -228,7 +255,10 @@
|
|
|
"material_list": "${videoResults.map(r => ({ type: 'video', value: r.videoUrl }))}",
|
|
|
"tags": "${extractKeywords(transcript)}",
|
|
|
"proportion": "${aspectRatio === '9:16' ? '9:16' : aspectRatio === '1:1' ? '1:1' : '9:16'}",
|
|
|
- "video_duration": { "min": 15, "max": 30 },
|
|
|
+ "video_duration": {
|
|
|
+ "min": 15,
|
|
|
+ "max": 30
|
|
|
+ },
|
|
|
"pre_id": "${Date.now().toString()}",
|
|
|
"ai_voice": 1,
|
|
|
"ai_bgm": 1,
|
|
|
@@ -238,7 +268,6 @@
|
|
|
"downstream": "video-creation/quickly-video-query"
|
|
|
}
|
|
|
],
|
|
|
-
|
|
|
"response": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
@@ -248,13 +277,29 @@
|
|
|
"items": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
- "id": { "type": "string" },
|
|
|
- "act": { "type": "string" },
|
|
|
- "narration": { "type": "string" },
|
|
|
- "prompt": { "type": "string" },
|
|
|
- "duration": { "type": "string" },
|
|
|
- "videoUrl": { "type": "string", "description": "鐢熸垚鐨勮棰慤RL锛堟案涔呮湁鏁堬級" },
|
|
|
- "imageUrl": { "type": "string", "description": "生成的首帧图片 URL(img2video 模式)" }
|
|
|
+ "id": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "act": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "narration": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "prompt": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "duration": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "videoUrl": {
|
|
|
+ "type": "string",
|
|
|
+ "description": "鐢熸垚鐨勮棰慤RL锛堟案涔呮湁鏁堬級"
|
|
|
+ },
|
|
|
+ "imageUrl": {
|
|
|
+ "type": "string",
|
|
|
+ "description": "生成的首帧图片 URL(img2video 模式)"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -268,20 +313,38 @@
|
|
|
"items": {
|
|
|
"type": "object",
|
|
|
"properties": {
|
|
|
- "id": { "type": "string" },
|
|
|
- "videoUrl": { "type": "string" },
|
|
|
- "duration": { "type": "number" },
|
|
|
- "prompt": { "type": "string" }
|
|
|
+ "id": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "videoUrl": {
|
|
|
+ "type": "string"
|
|
|
+ },
|
|
|
+ "duration": {
|
|
|
+ "type": "number"
|
|
|
+ },
|
|
|
+ "prompt": {
|
|
|
+ "type": "string"
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- "totalSegments": { "type": "integer" },
|
|
|
- "successCount": { "type": "integer" },
|
|
|
- "failedCount": { "type": "integer" },
|
|
|
- "failedIds": { "type": "array", "items": { "type": "string" } }
|
|
|
+ "totalSegments": {
|
|
|
+ "type": "integer"
|
|
|
+ },
|
|
|
+ "successCount": {
|
|
|
+ "type": "integer"
|
|
|
+ },
|
|
|
+ "failedCount": {
|
|
|
+ "type": "integer"
|
|
|
+ },
|
|
|
+ "failedIds": {
|
|
|
+ "type": "array",
|
|
|
+ "items": {
|
|
|
+ "type": "string"
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
"relatedSkills": [
|
|
|
"jimeng/jimeng-video-v3-720p",
|
|
|
"jimeng/jimeng-video-v3-1080p",
|
|
|
@@ -292,7 +355,6 @@
|
|
|
"video-creation/quickly-video-create",
|
|
|
"video-creation/quickly-video-query"
|
|
|
],
|
|
|
-
|
|
|
"pricing": {
|
|
|
"text2video_720p_5s": {
|
|
|
"perSegment": 1.4,
|
|
|
@@ -314,14 +376,12 @@
|
|
|
"img2video": "约115元"
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
"limitations": {
|
|
|
"videoDuration": "仅支持 5 秒(121 帧)或 10 秒(241 帧),无法精确匹配 SRT 时间戳",
|
|
|
"noTTS": "鏃燭TS閰嶉煶鑳藉姏锛岄渶鐢ㄦ埛鍦ㄥ壀鏄犱腑閰嶉煶",
|
|
|
"noAutoStitch": "暂无自动拼接长视频能力,quickly 最长 30 秒",
|
|
|
"parallelLimit": "即梦 API 建议并行数不超过 5,避免触发频率限制"
|
|
|
},
|
|
|
-
|
|
|
"futureExtensions": [
|
|
|
{
|
|
|
"name": "tts-voiceover",
|
|
|
@@ -339,55 +399,115 @@
|
|
|
"status": "planned"
|
|
|
}
|
|
|
],
|
|
|
-
|
|
|
"tokenConfig": {
|
|
|
- "type": "body",
|
|
|
- "tokenField": "token",
|
|
|
- "format": "Bearer r:{{jimengToken}}",
|
|
|
+ "type": "bearer",
|
|
|
"configFile": "~/.openclaw/voc-credentials.json",
|
|
|
- "currentToken": "Bearer r:f0333969e312a40e4703e8fe4ed1c600",
|
|
|
- "resolutionOrder": ["configFile", "currentToken"],
|
|
|
+ "tokenField": "vocToken",
|
|
|
+ "resolutionOrder": [
|
|
|
+ "configFile"
|
|
|
+ ],
|
|
|
+ "apigId": "Vo3ROWEvDy",
|
|
|
+ "paymentUrlResolution": {
|
|
|
+ "description": "动态构建充值URL:在已存在 session token 时查出用户 objectId,拼接到专属充值页面",
|
|
|
+ "steps": [
|
|
|
+ "1. 从 voc-credentials.json 获取当前 session token",
|
|
|
+ "2. 调用 GET https://server.fmode.cn/parse/users/me (Header: X-Parse-Application-Id: ncloudmaster, X-Parse-Session-Token: {token})获取用户 objectId",
|
|
|
+ "3. 拼接充值URL: https://app.fmode.cn/dev/apig-pay/?user={objectId}&apigid=Vo3ROWEvDy&fun_id=HOkkX72PMF",
|
|
|
+ "4. 将该URL展示给用户,引导扫码支付"
|
|
|
+ ],
|
|
|
+ "userResolveEndpoint": "https://server.fmode.cn/parse/users/me",
|
|
|
+ "userResolveHeaders": {
|
|
|
+ "X-Parse-Application-Id": "ncloudmaster",
|
|
|
+ "X-Parse-Session-Token": "{vocToken}"
|
|
|
+ },
|
|
|
+ "paymentBaseUrl": "https://app.fmode.cn/dev/apig-pay/",
|
|
|
+ "paymentParams": {
|
|
|
+ "user": "{resolvedUserId}",
|
|
|
+ "apigid": "Vo3ROWEvDy",
|
|
|
+ "fun_id": "HOkkX72PMF"
|
|
|
+ },
|
|
|
+ "balanceCheckEndpoint": "https://server.fmode.cn/api/apig/getApig"
|
|
|
+ },
|
|
|
"onMissing": {
|
|
|
"action": "showPaymentQR",
|
|
|
- "qrCodeUrl": "https://app.fmode.cn/dev/apig-pay/?authid=T0iOotHcDX&fun_id=HOkkX72PMF",
|
|
|
- "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
|
|
|
- "pollingIntervalMs": 3000,
|
|
|
- "pollingTimeoutMs": 300000,
|
|
|
- "onPaymentSuccess": "retrySkillWithNewToken",
|
|
|
- "title": "鎵爜寮€閫氬嵆姊I瑙嗛鐢熸垚鏈嶅姟",
|
|
|
- "message": "请扫描下方二维码完成支付,支付成功后将自动获取新 Token 并继续执行。"
|
|
|
+ "qrCodeUrl": "https://app.fmode.cn/dev/apig-pay/?apigid=Vo3ROWEvDy&fun_id=HOkkX72PMF",
|
|
|
+ "title": "扫码开通 VOC-AI 数据服务",
|
|
|
+ "message": "此 Skill 需要有效的 API Token。请先打开充值页面完成登录和充值;当用户提供 session token 后,请由 OpenClaw 运行 node scripts/tools/set-voc-token.js <session-token> 写入 ~/.openclaw/voc-credentials.json 的 vocToken 字段,再重试当前 Skill。",
|
|
|
+ "tokenSetupCommandTemplate": "node scripts/tools/set-voc-token.js {sessionToken}",
|
|
|
+ "tokenSetupInstructions": "当用户完成登录和充值后,如果用户把 session token 发给你,请直接运行 node scripts/tools/set-voc-token.js <session-token> 写入 ~/.openclaw/voc-credentials.json,然后重试当前 Skill。"
|
|
|
},
|
|
|
"onBalanceInsufficient": {
|
|
|
- "action": "showPaymentQR",
|
|
|
- "qrCodeUrl": "https://app.fmode.cn/dev/apig-pay/?authid=T0iOotHcDX&fun_id=HOkkX72PMF",
|
|
|
- "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
|
|
|
- "pollingIntervalMs": 3000,
|
|
|
- "pollingTimeoutMs": 300000,
|
|
|
- "onPaymentSuccess": "retrySkillWithNewToken",
|
|
|
- "title": "即梦 AI Token 余额不足,请扫码充值",
|
|
|
- "message": "当前 Token 余额不足,请扫描二维码充值,支付完成后将自动继续执行。"
|
|
|
+ "action": "resolveUserThenShowPayment",
|
|
|
+ "title": "VOC-AI Token 余额不足,请扫码充值",
|
|
|
+ "message": "当前 Token 余额不足,我将为你生成专属充值链接,扫码支付后即可继续使用。"
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
"errorHandling": {
|
|
|
"balanceInsufficient": {
|
|
|
"conditions": [
|
|
|
- { "responseField": "code", "operator": "in", "value": [-2, -3, -10, 402, 429] },
|
|
|
- { "responseField": "msg", "operator": "contains", "value": ["浣欓涓嶈冻", "insufficient", "balance", "quota"] }
|
|
|
+ {
|
|
|
+ "responseField": "code",
|
|
|
+ "operator": "in",
|
|
|
+ "value": [
|
|
|
+ -2,
|
|
|
+ -3,
|
|
|
+ -10,
|
|
|
+ 402,
|
|
|
+ 429
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "responseField": "msg",
|
|
|
+ "operator": "contains",
|
|
|
+ "value": [
|
|
|
+ "余额不足",
|
|
|
+ "insufficient",
|
|
|
+ "balance",
|
|
|
+ "quota"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "responseField": "message",
|
|
|
+ "operator": "contains",
|
|
|
+ "value": [
|
|
|
+ "余额不足",
|
|
|
+ "insufficient",
|
|
|
+ "balance"
|
|
|
+ ]
|
|
|
+ }
|
|
|
],
|
|
|
"matchMode": "any",
|
|
|
"trigger": "tokenConfig.onBalanceInsufficient"
|
|
|
},
|
|
|
- "segmentFailed": {
|
|
|
- "action": "markFailed",
|
|
|
- "description": "鍗曚釜鍒嗛暅娈电敓鎴愬け璐ユ椂鏍囪涓篺ailed锛屼笉闃诲鍏朵粬娈碉紝鏈€鍚庢眹鎬诲け璐ュ垪琛ㄤ緵閲嶈瘯"
|
|
|
+ "unauthorized": {
|
|
|
+ "conditions": [
|
|
|
+ {
|
|
|
+ "responseField": "code",
|
|
|
+ "operator": "in",
|
|
|
+ "value": [
|
|
|
+ 401,
|
|
|
+ 403
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "responseField": "msg",
|
|
|
+ "operator": "contains",
|
|
|
+ "value": [
|
|
|
+ "unauthorized",
|
|
|
+ "token",
|
|
|
+ "invalid",
|
|
|
+ "auth"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "matchMode": "any",
|
|
|
+ "trigger": "tokenConfig.onMissing"
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
"timeout": 600000,
|
|
|
"retry": {
|
|
|
"maxAttempts": 2,
|
|
|
"delay": 3000,
|
|
|
"backoffMultiplier": 2
|
|
|
}
|
|
|
-}
|
|
|
+}
|