gangvy 5 месяцев назад
Родитель
Сommit
25b129f971
97 измененных файлов с 1744 добавлено и 242 удалено
  1. 1 0
      Untitled-2.txt
  2. 2 2
      competitor-analysis/competitor-bsr-tracking/api-config.json
  3. 0 22
      competitor-analysis/competitor-discovery/api-config.json
  4. 2 2
      competitor-analysis/competitor-pricing-analysis/api-config.json
  5. 2 2
      competitor-analysis/competitor-product-comparison/api-config.json
  6. 277 0
      docs/cloudfunction/apig-payment/apigRechargeOnPay.md
  7. 2 2
      douyin/douyin-comment-replies/api-config.json
  8. 2 2
      douyin/douyin-general-search/api-config.json
  9. 2 2
      douyin/douyin-hashtag-search/api-config.json
  10. 2 2
      douyin/douyin-user-profile/api-config.json
  11. 2 2
      douyin/douyin-user-search/api-config.json
  12. 2 2
      douyin/douyin-video-comments/api-config.json
  13. 2 2
      douyin/douyin-video-detail/api-config.json
  14. 61 0
      jimeng/_update-payment-funid.js
  15. 1 1
      jimeng/jimeng-actor-v2/SKILL.md
  16. 2 2
      jimeng/jimeng-actor-v2/api-config.json
  17. 1 1
      jimeng/jimeng-actor/SKILL.md
  18. 2 2
      jimeng/jimeng-actor/api-config.json
  19. 1 1
      jimeng/jimeng-clothes-v2/SKILL.md
  20. 2 2
      jimeng/jimeng-clothes-v2/api-config.json
  21. 1 1
      jimeng/jimeng-img-v4-goods/SKILL.md
  22. 2 2
      jimeng/jimeng-img-v4-goods/api-config.json
  23. 1 1
      jimeng/jimeng-img-v4-pod/SKILL.md
  24. 2 2
      jimeng/jimeng-img-v4-pod/api-config.json
  25. 1 1
      jimeng/jimeng-img-v4/SKILL.md
  26. 2 2
      jimeng/jimeng-img-v4/api-config.json
  27. 1 1
      jimeng/jimeng-img2img-v3/SKILL.md
  28. 2 2
      jimeng/jimeng-img2img-v3/api-config.json
  29. 1 1
      jimeng/jimeng-inpaint/SKILL.md
  30. 2 2
      jimeng/jimeng-inpaint/api-config.json
  31. 1 1
      jimeng/jimeng-oh-detect/SKILL.md
  32. 2 2
      jimeng/jimeng-oh-detect/api-config.json
  33. 1 1
      jimeng/jimeng-oh-generate/SKILL.md
  34. 2 2
      jimeng/jimeng-oh-generate/api-config.json
  35. 1 1
      jimeng/jimeng-oh-identify/SKILL.md
  36. 2 2
      jimeng/jimeng-oh-identify/api-config.json
  37. 1 1
      jimeng/jimeng-oh-query/SKILL.md
  38. 2 2
      jimeng/jimeng-oh-query/api-config.json
  39. 1 1
      jimeng/jimeng-super-resolution/SKILL.md
  40. 2 2
      jimeng/jimeng-super-resolution/api-config.json
  41. 3 3
      jimeng/jimeng-task-query/SKILL.md
  42. 2 2
      jimeng/jimeng-task-query/api-config.json
  43. 1 1
      jimeng/jimeng-text2img-v3/SKILL.md
  44. 2 2
      jimeng/jimeng-text2img-v3/api-config.json
  45. 1 1
      jimeng/jimeng-text2img-v31/SKILL.md
  46. 2 2
      jimeng/jimeng-text2img-v31/api-config.json
  47. 1 1
      jimeng/jimeng-video-v3-1080p/SKILL.md
  48. 2 2
      jimeng/jimeng-video-v3-1080p/api-config.json
  49. 1 1
      jimeng/jimeng-video-v3-720p/SKILL.md
  50. 2 2
      jimeng/jimeng-video-v3-720p/api-config.json
  51. 1 1
      jimeng/jimeng-video-v3-pro/SKILL.md
  52. 2 2
      jimeng/jimeng-video-v3-pro/api-config.json
  53. 40 0
      jimeng/jimeng-work-result/SKILL.md
  54. 86 0
      jimeng/jimeng-work-result/api-config.json
  55. 159 65
      payment/apig-pay.html
  56. 2 2
      review-analysis/review-batch-collection/api-config.json
  57. 2 2
      review-analysis/review-highlight-extraction/api-config.json
  58. 2 2
      review-analysis/review-keyword-cloud/api-config.json
  59. 2 2
      review-analysis/review-pain-point-extraction/api-config.json
  60. 2 2
      review-analysis/review-sentiment-analysis/api-config.json
  61. 21 0
      scripts/fix-qrcode-url.py
  62. 2 2
      social-media/instagram-search/api-config.json
  63. 2 2
      social-media/instagram-user-info/api-config.json
  64. 2 2
      social-media/instagram-user-posts/api-config.json
  65. 2 2
      social-media/tiktok-hashtag-detail/api-config.json
  66. 2 2
      social-media/tiktok-hashtag-videos/api-config.json
  67. 2 2
      social-media/tiktok-user-posts/api-config.json
  68. 2 2
      social-media/tiktok-user-profile/api-config.json
  69. 2 2
      social-media/tiktok-user-search/api-config.json
  70. 2 2
      social-media/tiktok-video-comments/api-config.json
  71. 2 2
      social-media/tiktok-video-detail/api-config.json
  72. 2 2
      social-media/tiktok-video-search/api-config.json
  73. 2 2
      social-voc/instagram-brand-voc/api-config.json
  74. 2 2
      social-voc/social-trend-analysis/api-config.json
  75. 2 2
      social-voc/tiktok-brand-voc/api-config.json
  76. 2 2
      social-voc/tiktok-category-voc/api-config.json
  77. 2 2
      synthesis/brand-profile/api-config.json
  78. 2 2
      synthesis/category-landscape/api-config.json
  79. 2 2
      synthesis/html-report-generator/api-config.json
  80. 2 2
      synthesis/product-deep-analysis/api-config.json
  81. 2 2
      synthesis/user-persona/api-config.json
  82. 2 2
      synthesis/voc-proposal/api-config.json
  83. 236 0
      video-creation/transcript-to-video/SKILL.md
  84. 393 0
      video-creation/transcript-to-video/api-config.json
  85. 2 2
      voc/asin-reverse-keywords/api-config.json
  86. 2 2
      voc/asin-sales-volume/api-config.json
  87. 2 2
      voc/category-products/api-config.json
  88. 2 2
      voc/category-tree/api-config.json
  89. 2 2
      voc/keyword-product-ranking/api-config.json
  90. 2 2
      voc/keyword-search-trend/api-config.json
  91. 2 2
      voc/keyword-search/api-config.json
  92. 2 2
      voc/product-detail-query/api-config.json
  93. 2 2
      voc/product-monitor/api-config.json
  94. 2 2
      voc/product-reviews-query/api-config.json
  95. 2 2
      voc/product-search/api-config.json
  96. 2 2
      voc/similar-products/api-config.json
  97. 315 0
      workflows/transcript_to_video.workflow.json

+ 1 - 0
Untitled-2.txt

@@ -0,0 +1 @@
+    

+ 2 - 2
competitor-analysis/competitor-bsr-tracking/api-config.json

@@ -158,7 +158,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -168,7 +168,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 0 - 22
competitor-analysis/competitor-discovery/api-config.json

@@ -211,28 +211,6 @@
   "tokenConfig": {
     "type": "bearer",
     "configFile": "~/.openclaw/voc-credentials.json",
-    "tokenField": "vocToken",
-    "currentToken": "r:858b3ee92314d5447d1fc3cdc10462d7",
-    "resolutionOrder": ["configFile", "currentToken"],
-    "onMissing": {
-      "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
-      "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
-      "pollingIntervalMs": 3000,
-      "pollingTimeoutMs": 300000,
-      "onPaymentSuccess": "retrySkillWithNewToken",
-      "title": "扫码开通 VOC-AI 数据服务",
-      "message": "请扫描下方二维码完成支付,支付成功后将自动获取 Token 并继续执行。"
-    },
-    "onBalanceInsufficient": {
-      "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
-      "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
-      "pollingIntervalMs": 3000,
-      "pollingTimeoutMs": 300000,
-      "onPaymentSuccess": "retrySkillWithNewToken",
-      "title": "VOC-AI Token 余额不足,请扫码充值",
-      "message": "当前 Token 余额不足,请扫描二维码充值,支付完成后将自动继续执行。"
     }
   },
   "errorHandling": {

+ 2 - 2
competitor-analysis/competitor-pricing-analysis/api-config.json

@@ -181,7 +181,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -191,7 +191,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
competitor-analysis/competitor-product-comparison/api-config.json

@@ -168,7 +168,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -178,7 +178,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 277 - 0
docs/cloudfunction/apig-payment/apigRechargeOnPay.md

@@ -0,0 +1,277 @@
+# apigRechargeOnPay 云函数
+
+## 功能说明
+微信支付成功后,由支付回调自动触发的 APIG 充值云函数。
+通过 `pay_code2` 的 `fun_id` 参数绑定,支付成功后微信回调自动执行,无需前端调用 `saveRecharge`。
+
+**解决的问题:** 用户支付后关闭页面导致余额不到账。
+
+## 触发方式
+- 不需要前端主动调用
+- 由 `pay_code2` 支付流程自动触发:前端请求 `pay_code2` 时传入 `fun_id`,微信支付成功回调后服务端自动执行该云函数
+
+## 接收参数(由微信回调 PayReturn 数据传入)
+
+云函数通过 `request.params.data` 接收微信支付回调数据(PayReturn),关键字段:
+
+| 字段 | 说明 |
+|------|------|
+| out_trade_no | 商户订单号(前端生成的 tradeNo) |
+| total_fee | 支付金额(分) |
+| result_code | 支付结果,"SUCCESS" 表示成功 |
+| transaction_id | 微信支付交易号 |
+
+## 执行逻辑
+
+```
+1. 从回调数据提取 out_trade_no(即前端的 tradeNo)
+2. 查询 APIGOrder 表 WHERE orderNum = out_trade_no → 找到对应订单
+3. 校验订单未重复充值(detail.rechargedBy != 'apigRechargeOnPay')
+4. 从 order.apig 获取 APIG objectId,从 order.detail.addCount 获取充值数
+5. 查询 APIG 表获取当前余额
+6. 更新 APIG.count = 当前余额 + detail.addCount
+7. 更新 APIGOrder:isPay=true,合并 rechargedBy/rechargedAt/newCount 到 detail
+8. 返回充值结果
+```
+
+## 云函数代码
+
+> **重要**: 此云函数由微信支付回调通过 `fun_id` 自动触发,**不要在前端调用**。
+> 云函数平台部署,非 Parse 服务端函数。直接复制下方代码到云函数平台即可。
+
+```javascript
+async function handler(request, response) {
+  console.log('apigRechargeOnPay 开始');
+  
+  // DEBUG: 打印关键属性
+  console.log('request.body:', JSON.stringify(request.body));
+  
+  try {
+    // 1. 提取回调数据
+    // 服务端调用云函数时传: { id: fun_id, params: jsonData }
+    // 所以微信回调数据在 request.body.params 中
+    var payData = null;
+    var body = request.body;
+    
+    // body 可能是字符串,先解析
+    if (typeof body === 'string') {
+      try { body = JSON.parse(body); } catch(e) { body = {}; }
+    }
+    
+    // 优先从 body.params 提取(服务端实际发送路径)
+    if (body && body.params) {
+      var d = body.params;
+      if (typeof d === 'string') {
+        try { d = JSON.parse(d); } catch(e) { d = {}; }
+      }
+      if (d.out_trade_no) {
+        payData = d;
+        console.log('从 request.body.params 提取, out_trade_no:', d.out_trade_no);
+      }
+    }
+    
+    // fallback: body.data(兼容旧版服务端)
+    if (!payData && body && body.data) {
+      var d2 = body.data;
+      if (typeof d2 === 'string') {
+        try { d2 = JSON.parse(d2); } catch(e) { d2 = {}; }
+      }
+      if (d2.out_trade_no) {
+        payData = d2;
+        console.log('从 request.body.data 提取, out_trade_no:', d2.out_trade_no);
+      }
+    }
+    
+    // fallback: 直接在 body 中找(兼容手动测试等场景)
+    if (!payData && body && body.out_trade_no) {
+      payData = body;
+      console.log('从 request.body 直接提取, out_trade_no:', body.out_trade_no);
+    }
+    
+    // fallback: request.params(兼容云函数平台手动测试)
+    if (!payData && request.params) {
+      var p = request.params;
+      if (typeof p === 'string') {
+        try { p = JSON.parse(p); } catch(e) { p = {}; }
+      }
+      if (p.out_trade_no) {
+        payData = p;
+        console.log('从 request.params 提取, out_trade_no:', p.out_trade_no);
+      }
+    }
+    
+    if (!payData || !payData.out_trade_no) {
+      console.log('未找到out_trade_no, body:', JSON.stringify(body));
+      response.json({ code: 400, success: false, error: '未找到out_trade_no' });
+      return;
+    }
+    
+    // 兼容数组格式(微信回调XML解析后字段可能是数组如 ["CU2026..."])
+    var outTradeNo = payData.out_trade_no;
+    if (Array.isArray(outTradeNo)) outTradeNo = outTradeNo[0];
+    var transactionId = payData.transaction_id || '';
+    if (Array.isArray(transactionId)) transactionId = transactionId[0] || '';
+    
+    // 2. 查询 APIGOrder(字段: orderNum=商户单号, apig=APIG指针, detail=JSON含addCount)
+    var orderResult = await Psql.query(
+      'SELECT * FROM "APIGOrder" WHERE "orderNum" = $1 ORDER BY "createdAt" DESC LIMIT 1',
+      [outTradeNo]
+    );
+    
+    if (!orderResult || orderResult.length === 0) {
+      console.log('未找到订单, orderNum:', outTradeNo);
+      response.json({ code: 404, success: false, error: '未找到订单: ' + outTradeNo });
+      return;
+    }
+    
+    var order = orderResult[0];
+    var detail = order.detail;
+    if (typeof detail === 'string') {
+      try { detail = JSON.parse(detail); } catch(e) { detail = {}; }
+    }
+    if (!detail) detail = {};
+    
+    console.log('订单:', order.objectId, 'apig:', order.apig, 'isPay:', order.isPay, 'detail:', JSON.stringify(detail));
+    
+    // 3. 防重复: 已由云函数或 saveRecharge 处理过则跳过
+    if (detail.rechargedBy === 'apigRechargeOnPay') {
+      console.log('已由云函数充值,跳过');
+      response.json({ code: 200, success: true, msg: '已充值(云函数)' });
+      return;
+    }
+    if (order.isPay === true || order.isPay === 'true') {
+      console.log('订单已支付(isPay=true),可能已由saveRecharge处理,跳过');
+      response.json({ code: 200, success: true, msg: '已充值(isPay)' });
+      return;
+    }
+    
+    // apig 可能是: "Vo3ROWEvDy" 或 {"objectId":"Vo3ROWEvDy",...} 或 "APIG$Vo3ROWEvDy"
+    var apigId = order.apig;
+    if (typeof apigId === 'object' && apigId && apigId.objectId) {
+      apigId = apigId.objectId;
+    } else if (typeof apigId === 'string' && apigId.indexOf('$') > -1) {
+      apigId = apigId.split('$')[1];
+    }
+    var addCount = parseInt(detail.addCount) || 0;
+    
+    console.log('解析后 apigId:', apigId, 'addCount:', addCount);
+    
+    if (!apigId || addCount <= 0) {
+      console.log('数据异常 apig原始值:', JSON.stringify(order.apig), 'apigId:', apigId, 'addCount:', addCount);
+      response.json({ code: 400, success: false, error: '订单数据异常' });
+      return;
+    }
+    
+    // 4. 获取 APIGAuth(计费表)objectId
+    var apigAuthId = null;
+    if (detail.apigAuth) {
+      if (typeof detail.apigAuth === 'object' && detail.apigAuth.objectId) {
+        apigAuthId = detail.apigAuth.objectId;
+      } else if (typeof detail.apigAuth === 'string') {
+        // 可能是 "APIGAuth$T0iOotHcDX" 格式
+        apigAuthId = detail.apigAuth.indexOf('$') > -1 ? detail.apigAuth.split('$')[1] : detail.apigAuth;
+      }
+    }
+    
+    console.log('apigAuthId:', apigAuthId);
+    
+    if (!apigAuthId) {
+      console.log('未找到apigAuth, detail:', JSON.stringify(detail));
+      response.json({ code: 400, success: false, error: '订单缺少apigAuth信息' });
+      return;
+    }
+    
+    // 5. 查询 APIGAuth 计费表余额
+    var authResult = await Psql.query(
+      'SELECT "objectId", "count", "used" FROM "APIGAuth" WHERE "objectId" = $1 LIMIT 1',
+      [apigAuthId]
+    );
+    
+    if (!authResult || authResult.length === 0) {
+      console.log('未找到APIGAuth:', apigAuthId);
+      response.json({ code: 404, success: false, error: '未找到APIGAuth: ' + apigAuthId });
+      return;
+    }
+    
+    var currentCount = parseInt(authResult[0].count) || 0;
+    var newCount = currentCount + addCount;
+    console.log('APIGAuth余额计算:', currentCount, '+', addCount, '=', newCount);
+    
+    // 6. 更新 APIGAuth 计费表余额
+    await Psql.query(
+      'UPDATE "APIGAuth" SET "count" = $1, "updatedAt" = NOW() WHERE "objectId" = $2',
+      [newCount, apigAuthId]
+    );
+    console.log('APIGAuth余额已更新:', newCount);
+    
+    // 7. 更新 APIGOrder: isPay=true, detail 加入充值标记
+    detail.newCount = newCount;
+    detail.transactionId = transactionId;
+    detail.rechargedAt = new Date().toISOString();
+    detail.rechargedBy = 'apigRechargeOnPay';
+    
+    await Psql.query(
+      'UPDATE "APIGOrder" SET "isPay" = true, "detail" = $1::jsonb, "updatedAt" = NOW() WHERE "objectId" = $2',
+      [JSON.stringify(detail), order.objectId]
+    );
+    console.log('订单已更新:', order.objectId);
+    
+    // 8. 返回
+    response.json({ 
+      code: 200, success: true, msg: '充值成功',
+      data: { orderId: order.objectId, apigAuthId: apigAuthId, oldCount: currentCount, newCount: newCount }
+    });
+    console.log('apigRechargeOnPay 完成');
+
+  } catch (error) {
+    console.error('apigRechargeOnPay 失败:', error.message, error.stack);
+    response.json({ code: 500, success: false, error: error.message });
+  }
+}
+```
+
+## 云函数部署说明
+
+- **云函数名称**: `apigRechargeOnPay`
+- **触发方式**: 由 `pay_code2` 的 `fun_id` 参数绑定,微信支付回调后自动执行
+- **无需前端调用**,完全由后端处理
+
+### 部署步骤
+1. 在 Parse Dashboard 或服务端创建云函数,代码如上
+2. 获取云函数的 objectId 作为 `fun_id`
+3. 前端 `pay_code2` 调用时传入 `fun_id: '<云函数objectId>'`
+
+## 前端适配(apig-pay.html)
+
+升级前:
+```javascript
+// 前端发起支付
+const payResp = await postJSON(PARSE_BASE + '/pay_code2', {
+  _ApplicationId: APP_ID,
+  company: PAY_COMPANY,
+  out_trade_no: tradeNo,
+  total_fee: +tier.price,
+  body: apig.title + ' 接口充值'
+});
+// ... 支付成功后前端调 saveRecharge(有页面关闭风险)
+```
+
+升级后:
+```javascript
+// 前端发起支付 — 加入 fun_id
+const payResp = await postJSON(PARSE_BASE + '/pay_code2', {
+  _ApplicationId: APP_ID,
+  company: PAY_COMPANY,
+  out_trade_no: tradeNo,
+  total_fee: +tier.price,
+  body: apig.title + ' 接口充值',
+  fun_id: FUN_ID  // 云函数ID,微信回调自动触发充值
+});
+// ... 支付成功后仅刷新余额展示(无需前端调 saveRecharge)
+```
+
+## 关键优势
+1. **防丢单**: 充值由微信回调触发,用户关闭页面也能到账
+2. **防重复**: 云函数内有防重复充值逻辑(检查 isPay + detail.addCount)
+3. **可追溯**: detail 字段记录完整的充值链路信息
+4. **前端简化**: 前端只需展示支付二维码和结果,无需处理充值逻辑

+ 2 - 2
douyin/douyin-comment-replies/api-config.json

@@ -109,7 +109,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -119,7 +119,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
douyin/douyin-general-search/api-config.json

@@ -193,7 +193,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -203,7 +203,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
douyin/douyin-hashtag-search/api-config.json

@@ -151,7 +151,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -161,7 +161,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
douyin/douyin-user-profile/api-config.json

@@ -90,7 +90,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -100,7 +100,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
douyin/douyin-user-search/api-config.json

@@ -113,7 +113,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -123,7 +123,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
douyin/douyin-video-comments/api-config.json

@@ -118,7 +118,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -128,7 +128,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
douyin/douyin-video-detail/api-config.json

@@ -91,7 +91,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -101,7 +101,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 61 - 0
jimeng/_update-payment-funid.js

@@ -0,0 +1,61 @@
+/**
+ * 批量更新即梦 skill 的 qrCodeUrl,加入 fun_id 参数
+ * 
+ * 使用方法:
+ *   node _update-payment-funid.js <fun_id>
+ * 
+ * 示例:
+ *   node _update-payment-funid.js abc123def456
+ * 
+ * 这会将所有 jimeng skill 的 qrCodeUrl 从:
+ *   https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX
+ * 更新为:
+ *   https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX&fun_id=abc123def456
+ * 
+ * 同时也会更新 voc 等其他分类下的 skill(如果有相同 URL 的话)
+ */
+const fs = require('fs');
+const path = require('path');
+
+const funId = process.argv[2];
+if (!funId) {
+  console.error('用法: node _update-payment-funid.js <fun_id>');
+  console.error('  fun_id: 部署 apigRechargeOnPay 云函数后获取的 objectId');
+  process.exit(1);
+}
+
+const OLD_URL = 'https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX';
+const NEW_URL = `https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX&fun_id=${funId}`;
+
+// 扫描所有分类目录
+const rootDir = path.resolve(__dirname, '..');
+const categories = ['jimeng', 'voc', 'social-media', 'competitor-analysis', 
+                     'review-analysis', 'synthesis', 'social-voc', 'douyin', 'video-creation'];
+
+let updated = 0;
+let scanned = 0;
+
+for (const category of categories) {
+  const catDir = path.join(rootDir, category);
+  if (!fs.existsSync(catDir)) continue;
+
+  const dirs = fs.readdirSync(catDir, { withFileTypes: true })
+    .filter(d => d.isDirectory() && !d.name.startsWith('_'));
+
+  for (const dir of dirs) {
+    const configPath = path.join(catDir, dir.name, 'api-config.json');
+    if (!fs.existsSync(configPath)) continue;
+    scanned++;
+
+    let content = fs.readFileSync(configPath, 'utf-8');
+    if (content.includes(OLD_URL) && !content.includes('fun_id=')) {
+      content = content.split(OLD_URL).join(NEW_URL);
+      fs.writeFileSync(configPath, content, 'utf-8');
+      console.log(`[OK] ${category}/${dir.name}`);
+      updated++;
+    }
+  }
+}
+
+console.log(`\n扫描 ${scanned} 个 skill,更新 ${updated} 个文件`);
+console.log(`新 URL: ${NEW_URL}`);

+ 1 - 1
jimeng/jimeng-actor-v2/SKILL.md

@@ -24,7 +24,7 @@ author: nkkj-BrainHack
 | video_url | string | ✅ | 模版视频URL |
 | cut_result_first_second_switch | boolean | ❌ | 是否裁剪结果视频第1秒,默认true |
 | callback_url | string | ❌ | 回调接口URL |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-actor-v2/api-config.json

@@ -93,7 +93,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -103,7 +103,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-actor/SKILL.md

@@ -22,7 +22,7 @@ author: nkkj-BrainHack
 |------|------|------|------|
 | video_url | string | ✅ | 模版视频URL |
 | image_url | string | ✅ | 图片URL |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-actor/api-config.json

@@ -83,7 +83,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -93,7 +93,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-clothes-v2/SKILL.md

@@ -36,7 +36,7 @@ author: nkkj-BrainHack
 | inference_config.p_bbox_iou_ratio | number | ❌ | 多人时bbox相交比例,默认0.3 |
 | inference_config.p_bbox_expand_ratio | number | ❌ | bbox扩大比例,默认1.1 |
 | inference_config.max_process_side_length | number | ❌ | 最大边长,默认1920 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-clothes-v2/api-config.json

@@ -145,7 +145,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -155,7 +155,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-img-v4-goods/SKILL.md

@@ -24,7 +24,7 @@ author: nkkj-BrainHack
 | instruction | number | ❌ | 编辑指令,默认1。1:全身衣服 2:鞋子 3:包包 4:沙发 5:日用品 6:饰品 |
 | sizeDate | object | ❌ | 图片尺寸,默认2048×2048 |
 | prompt | string | ❌ | 提示词 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-img-v4-goods/api-config.json

@@ -111,7 +111,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -121,7 +121,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-img-v4-pod/SKILL.md

@@ -25,7 +25,7 @@ author: nkkj-BrainHack
 | prompt | string | ❌ | 提示词 |
 | lora_weight | number | ❌ | lora权重,范围[0,1],默认1.0 |
 | sizeDate | object | ❌ | 图片尺寸,默认2048×2048 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-img-v4-pod/api-config.json

@@ -115,7 +115,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -125,7 +125,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-img-v4/SKILL.md

@@ -35,7 +35,7 @@ author: nkkj-BrainHack
 | sizeDate.height | number | ❌ | 图片高 |
 | scale | float | ❌ | 文本影响程度,范围[0,1],默认0.5 |
 | force_single | boolean | ❌ | 是否强制生成单图,默认false |
-| token | string | ✅ | 认证token,格式: `Bearer r:xxxxxxxx` |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 **推荐尺寸搭配:**
 - 1K: 1024×1024

+ 2 - 2
jimeng/jimeng-img-v4/api-config.json

@@ -150,7 +150,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -160,7 +160,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-img2img-v3/SKILL.md

@@ -24,7 +24,7 @@ author: nkkj-BrainHack
 | prompt | string | ✅ | 提示词,建议<=120字符,最长800字符 |
 | scale | number | ❌ | 文本描述影响程度,范围[0,1],默认0.5 |
 | sizeDate | object | ❌ | 图片尺寸,默认1328×1328 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-img2img-v3/api-config.json

@@ -103,7 +103,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -113,7 +113,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-inpaint/SKILL.md

@@ -22,7 +22,7 @@ author: nkkj-BrainHack
 |------|------|------|------|
 | image_urls | string[] | ✅ | 图片文件URL,需输入2张(原图+mask图) |
 | prompt | string | ✅ | 提示词,消除场景输入"删除" |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-inpaint/api-config.json

@@ -88,7 +88,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -98,7 +98,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-oh-detect/SKILL.md

@@ -22,7 +22,7 @@ author: nkkj-BrainHack
 |------|------|------|------|
 | workId | string | ✅ (二选一) | 步骤1的workId |
 | taskId | string | ✅ (二选一) | 任务ID |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-oh-detect/api-config.json

@@ -82,7 +82,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -92,7 +92,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-oh-generate/SKILL.md

@@ -28,7 +28,7 @@ author: nkkj-BrainHack
 | prompt | string | ❌ | 提示词,调整画面/动作/运镜 |
 | pe_fast_mode | boolean | ❌ | 快速模式,默认false |
 | mask_url | string[] | ❌ | 掩码图URL列表(指定主体) |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-oh-generate/api-config.json

@@ -112,7 +112,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -122,7 +122,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-oh-identify/SKILL.md

@@ -31,7 +31,7 @@ author: nkkj-BrainHack
 | 参数 | 类型 | 必填 | 说明 |
 |------|------|------|------|
 | image_url | string | ✅ | 图片URL |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-oh-identify/api-config.json

@@ -78,7 +78,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -88,7 +88,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-oh-query/SKILL.md

@@ -23,7 +23,7 @@ author: nkkj-BrainHack
 | taskId | string | ✅ (二选一) | 任务ID |
 | routerName | string | ✅ | 查询接口名称: getOhIdentifyMain 或 getOmniHuman |
 | logo_info | object | ❌ | 水印信息(仅routerName=getOmniHuman时生效) |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-oh-query/api-config.json

@@ -136,7 +136,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -146,7 +146,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-super-resolution/SKILL.md

@@ -23,7 +23,7 @@ author: nkkj-BrainHack
 | image_urls | string[] | ✅ | 图片文件URL,需输入1张 |
 | resolution | string | ❌ | 图片分辨率,默认'4k',可选'4k'或'8k' |
 | scale | number | ❌ | 细节生成程度,默认50,范围[0,100] |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-super-resolution/api-config.json

@@ -97,7 +97,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -107,7 +107,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 3 - 3
jimeng/jimeng-task-query/SKILL.md

@@ -21,7 +21,7 @@ author: nkkj-BrainHack
 ```
 上游: jimeng-img-v4 / jimeng-text2img-v3 / 其他生成skill → 获得 workId
 本步: jimeng-task-query(workId, routerName) → 轮询直到 isFinish=true
-下游: 查询 ImagineWork 表(objectId=workId) → images/videos 字段
+下游: jimeng-work-result(workId) → 获取 images/videos URL
 ```
 
 ## 入参规则
@@ -37,7 +37,7 @@ author: nkkj-BrainHack
 | logo_info.language | integer | ❌ | 0中文/1英文 |
 | logo_info.opacity | float | ❌ | 不透明度[0,1],默认1 |
 | logo_info.logo_text_content | string | ❌ | 自定义水印文本 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 **routerName 可选值:**
 `getClothesV2`、`getImgByImg`、`getImgV4`、`getText2ImgV3`、`getText2ImgV31`、`getImg2ImgV3`、`getImgV4_pod`、`getImgV4_goods`、`getInpaint`、`getSuperResolution`、`getVideoV3_720p`、`getVideoV3_1080p`、`getVideoV3_Pro`、`getActor`、`getActorV2`
@@ -69,7 +69,7 @@ author: nkkj-BrainHack
 
 ## 获取最终结果
 
-任务完成后,查询 ImagineWork 表(objectId = workId)
+任务完成后,调用 **jimeng-work-result** skill(传入 workId)获取最终图片/视频 URL
 - `images`: 图片URL数组(永久有效)
 - `videos`: 视频URL数组(永久有效)
 

+ 2 - 2
jimeng/jimeng-task-query/api-config.json

@@ -149,7 +149,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -159,7 +159,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-text2img-v3/SKILL.md

@@ -25,7 +25,7 @@ author: nkkj-BrainHack
 | sizeDate | object | ❌ | 图片尺寸,默认1328×1328 |
 | sizeDate.width | number | ❌ | 图片宽 |
 | sizeDate.height | number | ❌ | 图片高 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 **推荐尺寸:**
 - 标清1K: 1328×1328(1:1)、1472×1104(4:3)、1584×1056(3:2)、1664×936(16:9)

+ 2 - 2
jimeng/jimeng-text2img-v3/api-config.json

@@ -103,7 +103,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -113,7 +113,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-text2img-v31/SKILL.md

@@ -25,7 +25,7 @@ author: nkkj-BrainHack
 | sizeDate | object | ❌ | 图片尺寸,默认1328×1328 |
 | sizeDate.width | number | ❌ | 图片宽 |
 | sizeDate.height | number | ❌ | 图片高 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 **尺寸约束同 text2img-v3。**
 

+ 2 - 2
jimeng/jimeng-text2img-v31/api-config.json

@@ -98,7 +98,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -108,7 +108,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-video-v3-1080p/SKILL.md

@@ -24,7 +24,7 @@ author: nkkj-BrainHack
 | frames | number | ❌ | 帧数,范围[121,241],默认121 |
 | method | string | ✅ | 生成方式: 1文生视频 2首帧 3首尾帧 |
 | config | object | ❌ | 配置参数(同720p的method 1/2/3) |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 > 注意:1080p版本不支持 method=4(运镜),如需运镜请使用 720p 版本。
 

+ 2 - 2
jimeng/jimeng-video-v3-1080p/api-config.json

@@ -122,7 +122,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -132,7 +132,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-video-v3-720p/SKILL.md

@@ -25,7 +25,7 @@ author: nkkj-BrainHack
 | frames | number | ❌ | 帧数,范围[121,241],默认121(5s=121帧, 10s=241帧) |
 | method | string | ✅ | 生成方式: 1文生视频 2首帧 3首尾帧 4运镜 |
 | config | object | ❌ | 其他配置参数 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ### method=1 文生视频 config参数
 | 参数 | 类型 | 说明 |

+ 2 - 2
jimeng/jimeng-video-v3-720p/api-config.json

@@ -153,7 +153,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -163,7 +163,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 1 - 1
jimeng/jimeng-video-v3-pro/SKILL.md

@@ -25,7 +25,7 @@ author: nkkj-BrainHack
 | image_urls | string/string[] | ❌ | 首帧图片URL(允许传数组或单值) |
 | frames | number | ❌ | 帧数,范围[121,241],默认121 |
 | aspect_ratio | number | ❌ | 比例编号: 1=16:9 2=4:3 3=1:1 4=3:4 5=9:16 6=21:9 |
-| token | string | ✅ | 认证token |
+| token | string | ❌ | 认证token(已内置默认值,无需提供) |
 
 ## 接口调用方式
 

+ 2 - 2
jimeng/jimeng-video-v3-pro/api-config.json

@@ -113,7 +113,7 @@
     ],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -123,7 +123,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 40 - 0
jimeng/jimeng-work-result/SKILL.md

@@ -0,0 +1,40 @@
+---
+name: jimeng-work-result
+description: 根据 workId 查询 ImagineWork 表,获取生成的图片/视频 URL。
+version: 1.0.0
+author: nkkj-BrainHack
+---
+
+# 即梦作品结果查询
+
+## 功能
+根据 workId 查询 ImagineWork 表,获取生成的图片/视频 URL。
+
+## 使用场景
+当 `jimeng-task-query`(getDataByTask02)返回 `isFinish: true` 后,调用此 skill 获取最终的图片或视频下载链接。
+
+## 调用链
+1. 提交生成任务(如 jimeng-text2img-v31)→ 获取 workId
+2. 轮询任务状态(jimeng-task-query)→ isFinish: true
+3. **获取作品结果(本 skill)→ 返回 images / videos URL 列表**
+
+## 参数
+
+| 参数 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| workId | string | ✅ | 生成任务返回的 workId(即 ImagineWork 表的 objectId) |
+
+## 响应字段
+
+| 字段 | 类型 | 说明 |
+|------|------|------|
+| images | array\<string\> | 图片 URL 列表(已转存,永久有效) |
+| videos | array\<string\> | 视频 URL 列表(已转存,永久有效) |
+| prompt | string | 原始提示词 |
+| progress | number | 进度,1 表示完成 |
+
+## 注意事项
+- images 和 videos 中的 URL 已转存至华为云 OBS,永久有效
+- 图片生成类 skill 结果在 images 字段
+- 视频生成类 skill 结果在 videos 字段
+- 如果 images/videos 为空,说明任务尚未完成,需要先等 jimeng-task-query 返回 isFinish: true

+ 86 - 0
jimeng/jimeng-work-result/api-config.json

@@ -0,0 +1,86 @@
+{
+  "name": "jimeng-work-result",
+  "displayName": "即梦作品结果查询",
+  "description": "根据 workId 查询 ImagineWork 表,获取生成的图片/视频 URL。在 jimeng-task-query 返回 isFinish:true 后调用此接口获取最终结果。",
+  "category": "jimeng",
+  "version": "1.0.0",
+  "endpoint": {
+    "method": "GET",
+    "url": "https://server.fmode.cn/parse/classes/ImagineWork/{{workId}}",
+    "headers": {
+      "X-Parse-Application-Id": "ncloudmaster"
+    }
+  },
+  "parameters": {
+    "type": "object",
+    "required": ["workId"],
+    "properties": {
+      "workId": {
+        "type": "string",
+        "description": "生成任务返回的 workId(即 ImagineWork 表的 objectId),来自提交任务接口的响应"
+      }
+    }
+  },
+  "response": {
+    "type": "object",
+    "description": "ImagineWork 记录,包含生成结果",
+    "properties": {
+      "objectId": {
+        "type": "string",
+        "description": "记录ID(即 workId)"
+      },
+      "images": {
+        "type": "array",
+        "items": { "type": "string" },
+        "description": "图片 URL 列表(已转存华为云OBS,永久有效)。图片生成类任务的结果在此字段"
+      },
+      "videos": {
+        "type": "array",
+        "items": { "type": "string" },
+        "description": "视频 URL 列表(已转存,永久有效)。视频生成类任务的结果在此字段"
+      },
+      "prompt": {
+        "type": "string",
+        "description": "原始提示词"
+      },
+      "progress": {
+        "type": "number",
+        "description": "生成进度,1 表示完成"
+      },
+      "usage": {
+        "type": "object",
+        "description": "扣费详情"
+      }
+    }
+  },
+  "notes": "此接口通过 Parse REST API 直接查询 LeanCloud 的 ImagineWork 表。images/videos 中的 URL 已转存至华为云 OBS,永久有效。图片生成类 skill(text2img、img2img、img-v4 等)结果在 images 字段;视频生成类 skill(video-v3、actor 等)结果在 videos 字段。",
+  "usageExamples": [
+    {
+      "name": "查询文生图结果",
+      "input": {
+        "workId": "WCAMhCMpG4"
+      },
+      "description": "查询 workId 对应的图片生成结果,返回 images 数组",
+      "expectedOutput": {
+        "objectId": "WCAMhCMpG4",
+        "images": ["https://nova-cloud.obs.cn-south-1.myhuaweicloud.com/storage/aigc/imagine/WCAMhCMpG4-0.png"],
+        "videos": null,
+        "prompt": "一只可爱的橘猫在阳光下打盹,水彩画风格",
+        "progress": 1
+      }
+    }
+  ],
+  "relatedSkills": [
+    "jimeng-task-query",
+    "jimeng-text2img-v3",
+    "jimeng-text2img-v31",
+    "jimeng-img-v4",
+    "jimeng-video-v3-720p"
+  ],
+  "timeout": 10000,
+  "retry": {
+    "maxAttempts": 2,
+    "delay": 1000,
+    "backoffMultiplier": 2
+  }
+}

+ 159 - 65
payment/apig-pay.html

@@ -776,10 +776,16 @@ const PARSE_BASE = API_BASE + '/parse/functions';
 const PAY_COMPANY = '1AiWpTEDH9';
 const APP_ID = 'ncloudmaster';
 
+// 充值云函数ID — 微信支付回调自动执行 apigRechargeOnPay
+// 部署云函数后将 objectId 填入此处,或通过 URL 参数 fun_id 传入
+const DEFAULT_FUN_ID = 'HOkkX72PMF';
+
 // URL params
 const params = new URLSearchParams(window.location.search);
-const authId = params.get('authid') || '';
+let authId = params.get('authid') || '';
 const userId = params.get('user') || params.get('userid') || '';
+const apigId = params.get('apigid') || '';
+const funId = params.get('fun_id') || DEFAULT_FUN_ID;
 
 let apig = null;
 let selectedIndex = 0;
@@ -790,8 +796,8 @@ let pollTimer = null;
 
 // ─── Init ───
 document.addEventListener('DOMContentLoaded', () => {
-  if (!authId) {
-    showError('缺少 authid 参数,请通过正确链接访问本页面。');
+  if (!authId && !(userId && apigId)) {
+    showError('缺少参数。请传入 authid,或同时传入 user 和 apigid。');
     return;
   }
   // Show loading state
@@ -803,6 +809,17 @@ document.addEventListener('DOMContentLoaded', () => {
 // ─── Load APIG Info ───
 async function loadApig() {
   try {
+    // 如果没有 authId 但有 user+apigid,先查询/创建 APIGAuth
+    if (!authId && userId && apigId) {
+      console.log('[INIT] 无 authId,通过 user+apigid 查询 APIGAuth...');
+      authId = await resolveAuthId(userId, apigId);
+      if (!authId) {
+        showError('无法获取或创建计费账套,请联系管理员。');
+        return;
+      }
+      console.log('[INIT] 获取到 authId:', authId);
+    }
+
     // 1. Try getApig REST endpoint (works when authId is an APIGAuth objectId)
     const resp = await postJSON(API_BASE + '/api/apig/getApig', { authid: authId });
     if (resp.code === 200 && resp.data) {
@@ -815,8 +832,6 @@ async function loadApig() {
     }
 
     // 2. Fallback: use cloud function to query APIG by objectId
-    // Cloud function IDs: getApigInfo=t012qy4XVe, getApigAuth=H7X7y9Wfc0
-    // Note: FmodeParse SDK uses internal dispatch; direct REST call needs actual function name
     console.log('getApig returned no data, trying cloud function...');
     const cfFuncName = params.get('cfName') || 'getApigInfo';
     const cfResp = await parseCloudCall(cfFuncName, {
@@ -835,32 +850,62 @@ async function loadApig() {
       }
     }
 
-    // 3. Fallback: accept APIG data from URL params (OpenClaw can pass these)
-    const urlTitle = params.get('title');
-    const urlPrices = params.get('prices');
-    const urlCounts = params.get('counts');
-    if (urlTitle && urlPrices && urlCounts) {
-      console.log('Using APIG data from URL params');
-      const prices = urlPrices.split(',').map(Number);
-      const counts = urlCounts.split(',').map(Number);
-      apig = {
-        objectId: authId,
-        title: urlTitle,
-        content: params.get('desc') || '',
-        count: parseInt(params.get('balance') || '0'),
-        priceStep: prices.map((p, i) => ({ price: p, count: counts[i] || 0 }))
-      };
-      applyTestTier();
-      renderApigInfo();
-      renderTiers();
-      loadOrderHistory();
-      return;
+    showError('无法加载接口信息。请确认参数正确。');
+  } catch (e) {
+    showError('网络错误: ' + e.message);
+  }
+}
+
+// ─── 通过 user+apigid 查询或创建 APIGAuth ───
+async function resolveAuthId(user, apig) {
+  // 1. 查询是否已有 APIGAuth(user 对应 company,api 对应 APIG)
+  try {
+    const query = {
+      _method: 'GET',
+      where: JSON.stringify({
+        api: { __type: 'Pointer', className: 'APIG', objectId: apig },
+        company: { __type: 'Pointer', className: 'Company', objectId: user }
+      }),
+      limit: 1
+    };
+    const resp = await fetch(API_BASE + '/parse/classes/APIGAuth?' + new URLSearchParams(query), {
+      headers: { 'X-Parse-Application-Id': APP_ID }
+    });
+    const data = await resp.json();
+    if (data.results && data.results.length > 0) {
+      console.log('[resolveAuthId] 找到已有 APIGAuth:', data.results[0].objectId);
+      return data.results[0].objectId;
     }
+  } catch (e) {
+    console.warn('[resolveAuthId] 查询失败:', e.message);
+  }
 
-    showError('无法加载接口信息。请确认 authid 对应有效的 APIGAuth 记录,或通过 URL 参数传入套餐数据。');
+  // 2. 不存在则创建新的 APIGAuth
+  try {
+    console.log('[resolveAuthId] 未找到 APIGAuth,创建新记录...');
+    const createResp = await fetch(API_BASE + '/parse/classes/APIGAuth', {
+      method: 'POST',
+      headers: {
+        'X-Parse-Application-Id': APP_ID,
+        'Content-Type': 'application/json'
+      },
+      body: JSON.stringify({
+        api: { __type: 'Pointer', className: 'APIG', objectId: apig },
+        company: { __type: 'Pointer', className: 'Company', objectId: user },
+        count: 0,
+        used: 0
+      })
+    });
+    const created = await createResp.json();
+    if (created.objectId) {
+      console.log('[resolveAuthId] 创建成功:', created.objectId);
+      return created.objectId;
+    }
+    console.error('[resolveAuthId] 创建失败:', JSON.stringify(created));
   } catch (e) {
-    showError('网络错误: ' + e.message);
+    console.error('[resolveAuthId] 创建异常:', e.message);
   }
+  return null;
 }
 
 function applyTestTier() {
@@ -951,23 +996,56 @@ async function startPayment() {
 
     const tier = apig.priceStep[selectedIndex];
 
-    // 2. Call pay_code2 to get QR URL
-    const payResp = await postJSON(PARSE_BASE + '/pay_code2', {
+    // 2. Create order FIRST (so backend callback can find it)
+    console.log('[PAY] Creating order...', { tradeNo, tier: tier.price, funId });
+    await createOrder(tier);
+    console.log('[PAY] Order created, order=', order);
+
+    // 3. Call pay_code2 to get QR URL (with fun_id for auto-recharge)
+    const payParams = {
       _ApplicationId: APP_ID,
       company: PAY_COMPANY,
       out_trade_no: tradeNo,
       total_fee: +tier.price,
       body: apig.title + ' 接口充值'
-    });
+    };
+    // 传入 fun_id: 微信支付成功后回调自动执行充值云函数
+    if (funId) {
+      payParams.fun_id = funId;
+    }
+    console.log('[PAY] Calling pay_code2 with params:', JSON.stringify(payParams));
+    let payResp = null;
+    try {
+      const payController = new AbortController();
+      const payTimeout = setTimeout(() => payController.abort(), 15000);
+      const rawResp = await fetch(PARSE_BASE + '/pay_code2', {
+        method: 'POST',
+        headers: { 'Content-Type': 'application/json' },
+        body: JSON.stringify(payParams),
+        signal: payController.signal
+      });
+      clearTimeout(payTimeout);
+      payResp = await rawResp.json();
+      console.log('[PAY] pay_code2 response:', JSON.stringify(payResp));
+    } catch (fetchErr) {
+      console.error('[PAY] pay_code2 fetch error:', fetchErr.message);
+      // 如果带 fun_id 请求失败,尝试不带 fun_id 重试
+      if (payParams.fun_id) {
+        console.log('[PAY] Retrying pay_code2 WITHOUT fun_id...');
+        delete payParams.fun_id;
+        payResp = await postJSON(PARSE_BASE + '/pay_code2', payParams);
+        console.log('[PAY] pay_code2 retry response:', JSON.stringify(payResp));
+      } else {
+        throw fetchErr;
+      }
+    }
 
-    if (!payResp.result || !payResp.result.code_url) {
-      throw new Error('获取支付码失败');
+    if (!payResp || !payResp.result || !payResp.result.code_url) {
+      throw new Error('获取支付码失败: ' + JSON.stringify(payResp));
     }
     const codeUrl = payResp.result.code_url[0];
     nonceStr = payResp.result.nonce_str;
-
-    // 3. Create order
-    createOrder(tier);
+    console.log('[PAY] QR code URL:', codeUrl);
 
     // 4. Show QR modal
     document.getElementById('modalPrice').textContent = tier.price;
@@ -1041,44 +1119,60 @@ function startPolling() {
 }
 
 async function doRecharge() {
-  // Show success first, then try recharge in background (saveRecharge may timeout)
   showSuccess();
+  const oldCount = apig.count || 0;
+  const tier = apig.priceStep[selectedIndex];
+  console.log('═══ [RECHARGE] 开始 ═══ oldCount:', oldCount, 'addCount:', tier.count, 'fun_id:', funId);
+
+  // 步骤1: 等待后端微信回调自动执行云函数(fun_id 机制)
+  // 轮询 8 次(间隔 3 秒,共 24 秒)— 微信回调通常 5~15 秒到达
+  for (let i = 1; i <= 8; i++) {
+    console.log('[RECHARGE] 步骤1: 等待后端回调... 第' + i + '/8次 (3秒后)');
+    await new Promise(r => setTimeout(r, 3000));
+    await refreshBalance();
+    if (apig.count > oldCount) {
+      console.log('[RECHARGE] ✅ 后端回调充值成功! 余额:', oldCount, '→', apig.count);
+      console.log('═══ [RECHARGE] 结束 ═══ 最终余额:', apig.count);
+      loadOrderHistory();
+      return;
+    }
+  }
+
+  // 步骤2: 后端回调未生效,调用 saveRecharge 保底
+  console.log('[RECHARGE] 步骤2: 后端回调未生效,调用 saveRecharge 保底...');
   try {
-    const tier = apig.priceStep[selectedIndex];
-    // Build recharge body
-    // authid = APIGAuth objectId (T0iOotHcDX)
-    // apigid = APIG objectId from order or from getApig response
-    const apigObjId = apig.objectId || authId;
-    const body = {
+    const rechargeBody = {
+      user: userId || authId,
+      authComp: userId || authId,
       authid: authId,
-      apigid: apigObjId,
-      oldCount: apig.count || 0,
+      apigid: apig.objectId,
+      oldCount: oldCount,
       count: tier.count,
       orderid: order ? order.objectId : ''
     };
-    // Server requires fcompany or user; fallback to authId if userId is empty
-    body.user = userId || authId;
-    body.authComp = userId || authId;
-    body.fcompany = userId || authId;
-    console.log('saveRecharge body:', JSON.stringify(body));
-    // Use AbortController for 15s timeout
-    const controller = new AbortController();
-    const timer = setTimeout(() => controller.abort(), 15000);
-    const resp = await fetch(API_BASE + '/api/apig/saveRecharge', {
-      method: 'POST',
-      headers: { 'Content-Type': 'application/json' },
-      body: JSON.stringify(body),
-      signal: controller.signal
-    });
-    clearTimeout(timer);
-    const result = await resp.json().catch(() => null);
-    console.log('saveRecharge response:', result);
-    // Refresh balance display
-    await refreshBalance();
+    console.log('[RECHARGE] saveRecharge 参数:', JSON.stringify(rechargeBody));
+    const rechargeResp = await postJSON(API_BASE + '/api/apig/saveRecharge', rechargeBody);
+    console.log('[RECHARGE] saveRecharge 响应:', JSON.stringify(rechargeResp));
   } catch (e) {
-    console.warn('Recharge call failed (non-critical):', e.message);
+    console.warn('[RECHARGE] saveRecharge 失败:', e.message);
   }
-  // Refresh order history to show the new order
+
+  // 步骤3: 再轮询 3 次确认余额(saveRecharge 或延迟回调)
+  for (let i = 1; i <= 3; i++) {
+    await new Promise(r => setTimeout(r, 2000));
+    await refreshBalance();
+    if (apig.count > oldCount) {
+      console.log('[RECHARGE] ✅ saveRecharge 充值成功! 余额:', oldCount, '→', apig.count);
+      break;
+    }
+    console.log('[RECHARGE] 步骤3: 第' + i + '次余额未变 (' + apig.count + ')');
+  }
+
+  if (apig.count <= oldCount) {
+    console.warn('[RECHARGE] ⚠️ 充值可能延迟,请稍后刷新页面查看');
+  }
+
+  console.log('═══ [RECHARGE] 结束 ═══ 最终余额:', apig.count);
   loadOrderHistory();
 }
 

+ 2 - 2
review-analysis/review-batch-collection/api-config.json

@@ -199,7 +199,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -209,7 +209,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
review-analysis/review-highlight-extraction/api-config.json

@@ -157,7 +157,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -167,7 +167,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
review-analysis/review-keyword-cloud/api-config.json

@@ -141,7 +141,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -151,7 +151,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
review-analysis/review-pain-point-extraction/api-config.json

@@ -179,7 +179,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -189,7 +189,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
review-analysis/review-sentiment-analysis/api-config.json

@@ -177,7 +177,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -187,7 +187,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 21 - 0
scripts/fix-qrcode-url.py

@@ -0,0 +1,21 @@
+"""批量替换 api-config.json 中的 qrCodeUrl,UTF-8 安全"""
+import os, glob
+
+old = "authid=T0iOotHcDX"
+new = "user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF"
+
+root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+pattern = os.path.join(root, "**", "api-config.json")
+count = 0
+
+for f in glob.glob(pattern, recursive=True):
+    with open(f, "r", encoding="utf-8") as fh:
+        content = fh.read()
+    if old in content:
+        content = content.replace(old, new)
+        with open(f, "w", encoding="utf-8", newline="\n") as fh:
+            fh.write(content)
+        count += 1
+        print(f"Updated: {os.path.relpath(f, root)}")
+
+print(f"\nTotal: {count} files updated")

+ 2 - 2
social-media/instagram-search/api-config.json

@@ -147,7 +147,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -157,7 +157,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/instagram-user-info/api-config.json

@@ -147,7 +147,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -157,7 +157,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/instagram-user-posts/api-config.json

@@ -167,7 +167,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -177,7 +177,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-hashtag-detail/api-config.json

@@ -109,7 +109,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -119,7 +119,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-hashtag-videos/api-config.json

@@ -153,7 +153,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -163,7 +163,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-user-posts/api-config.json

@@ -150,7 +150,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -160,7 +160,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-user-profile/api-config.json

@@ -156,7 +156,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -166,7 +166,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-user-search/api-config.json

@@ -146,7 +146,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -156,7 +156,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-video-comments/api-config.json

@@ -155,7 +155,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -165,7 +165,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-video-detail/api-config.json

@@ -149,7 +149,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -159,7 +159,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-media/tiktok-video-search/api-config.json

@@ -200,7 +200,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -210,7 +210,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-voc/instagram-brand-voc/api-config.json

@@ -122,7 +122,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -132,7 +132,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-voc/social-trend-analysis/api-config.json

@@ -181,7 +181,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -191,7 +191,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-voc/tiktok-brand-voc/api-config.json

@@ -150,7 +150,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -160,7 +160,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
social-voc/tiktok-category-voc/api-config.json

@@ -161,7 +161,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -171,7 +171,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
synthesis/brand-profile/api-config.json

@@ -191,7 +191,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -201,7 +201,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
synthesis/category-landscape/api-config.json

@@ -234,7 +234,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -244,7 +244,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
synthesis/html-report-generator/api-config.json

@@ -172,7 +172,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -182,7 +182,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
synthesis/product-deep-analysis/api-config.json

@@ -432,7 +432,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -442,7 +442,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
synthesis/user-persona/api-config.json

@@ -215,7 +215,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -225,7 +225,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
synthesis/voc-proposal/api-config.json

@@ -240,7 +240,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -250,7 +250,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 236 - 0
video-creation/transcript-to-video/SKILL.md

@@ -0,0 +1,236 @@
+---
+name: transcript-to-video
+description: 逐字稿全自动视频生成工作流:输入逐字稿文本,AI拆分镜脚本,批量生成视频素材,输出视频片段URL列表+SRT字幕文件。
+version: 1.0.0
+author: nkkj-BrainHack
+---
+
+# 逐字稿 → AI视频生成工作流 (Transcript to Video)
+
+## 功能用途
+
+将一份逐字稿(文字脚本)全自动转化为AI视频素材。覆盖从文本拆分、分镜脚本生成、AI视频/图片批量生成、到结果汇总的完整链路。
+
+**核心业务场景:**
+- 自媒体内容创作:逐字稿 → 分镜 → AI视频素材 → 剪映成片
+- 批量短视频生产:一份长脚本 → N个视频片段
+- 知识付费/教程:讲稿 → 配图/配视频素材
+
+## 调用链(Workflow)
+
+```
+输入: 逐字稿文本(中文)
+  ↓
+Stage 1: AI 分镜脚本生成
+  Agent 将逐字稿拆分为分镜 JSON + SRT 字幕文件
+  每段包含: id, narration(中文旁白), prompt(英文视频提示词), duration(秒)
+  ↓
+Stage 2: 批量生成视频素材(并行)
+  对每个分镜段,调用 jimeng-video-v3-720p(文生视频)
+  或先调用 jimeng-img-v4(文生图)再调用 jimeng-video-v3-720p method=2(图生视频)
+  ↓
+Stage 3: 轮询获取结果(并行)
+  对每个任务调用 jimeng-task-query 轮询
+  完成后调用 jimeng-work-result 获取视频URL
+  ↓
+Stage 4: 结果汇总
+  输出: 视频片段URL列表 + SRT字幕文件 + 分镜脚本JSON
+  ↓
+可选 Stage 5: 一键成片
+  将部分素材传入 quickly-video-create 生成短视频(最长30秒)
+  或用户导入剪映/CapCut手动按SRT时间轴对齐
+```
+
+## 输入参数
+
+| 参数 | 类型 | 必填 | 说明 |
+|------|------|------|------|
+| transcript | string | ✅ | 逐字稿全文(中文) |
+| segmentDuration | number | ❌ | 每段目标时长(秒),默认15 |
+| videoModel | string | ❌ | 视频生成模型:`720p`(默认) / `1080p` / `pro` |
+| videoMethod | string | ❌ | 生成方式:`text2video`(默认,纯文生视频) / `img2video`(先生图再图生视频,效果更可控) |
+| aspectRatio | string | ❌ | 视频比例,默认 `16:9`,可选 `9:16` / `1:1` / `4:3` |
+| frames | number | ❌ | 帧数:121(5秒,默认) 或 241(10秒) |
+
+## 执行流程
+
+### Stage 1: AI 分镜脚本生成(Agent 执行)
+
+Agent 根据逐字稿,按每 `segmentDuration` 秒拆分为分镜段,输出:
+
+**分镜 JSON 格式:**
+```json
+[
+  {
+    "id": "S-01",
+    "act": "开场",
+    "narration": "回到开头那个数字,500美元。这个数字之所以让人震撼...",
+    "type": "ai-gen",
+    "prompt": "Extreme wide shot: a single desk with a glowing monitor floating in an infinite dark void...",
+    "duration": "15s"
+  },
+  {
+    "id": "S-02",
+    "act": "正文",
+    "narration": "然后他——或者说他——用这套工具在这个几乎不可能赚到钱的...",
+    "type": "ai-gen",
+    "prompt": "Final shot callback: the massive fortress wall from the opening...",
+    "duration": "15s"
+  }
+]
+```
+
+**SRT 字幕文件格式:**
+```srt
+1
+00:00:00,000 --> 00:00:15,000
+回到开头那个数字,500美元。这个数字之所以让人震撼...
+
+2
+00:00:15,000 --> 00:00:30,000
+然后他——或者说他——用这套工具在这个几乎不可能赚到钱的...
+```
+
+**分镜拆分规则:**
+- 每段约40~45个中文字(约15秒语速)
+- narration 用中文(原始逐字稿文本)
+- prompt 用英文(翻译+扩写为画面描述,适合AI视频生成)
+- prompt 应包含:镜头类型、场景、动作、氛围、画质关键词
+
+### Stage 2: 批量生成视频素材
+
+**方式A: text2video(文生视频,快速)**
+
+对每个分镜段,调用:
+```
+jimeng-video-v3-720p:
+  prompt: segment.prompt
+  method: "1"  (文生视频)
+  frames: 121  (5秒) 或 241 (10秒)
+  config:
+    aspect_ratio: "16:9"
+```
+
+**方式B: img2video(先图后视频,效果更可控)**
+
+Step 1: 对每个分镜段,先生成图片:
+```
+jimeng-img-v4:
+  prompt: segment.prompt
+  sizeDate: { width: 2560, height: 1440 }  (16:9)
+```
+
+Step 2: 图片生成完成后,用图片作为首帧生成视频:
+```
+jimeng-video-v3-720p:
+  prompt: segment.prompt
+  method: "2"  (首帧图生视频)
+  frames: 121
+  config:
+    image_urls: [图片URL]
+```
+
+**并行策略:**
+- 最多 5 个分镜段并行生成
+- 每段生成间隔 1 秒(避免频率限制)
+- 单段超时 5 分钟
+
+### Stage 3: 轮询获取结果
+
+对每个生成任务:
+
+```
+jimeng-task-query:
+  workId: <上一步返回的workId>
+  routerName: "getVideoV3_720p"  (或对应的routerName)
+```
+
+轮询直到 `isFinish: true`,然后:
+
+```
+jimeng-work-result:
+  workId: <workId>
+→ 获取 videos[0] 作为该分镜段的视频URL
+```
+
+### Stage 4: 结果汇总
+
+输出完整的视频素材包:
+```json
+{
+  "storyboard": [...],        // 分镜JSON
+  "srt": "...",               // SRT字幕内容
+  "segments": [
+    {
+      "id": "S-01",
+      "videoUrl": "https://...",  // 视频URL(永久有效)
+      "duration": 5,              // 实际视频时长
+      "prompt": "..."
+    }
+  ],
+  "totalSegments": 71,
+  "successCount": 70,
+  "failedCount": 1,
+  "failedIds": ["S-45"]
+}
+```
+
+### 可选 Stage 5: 一键成片(quickly-video-create)
+
+将生成的视频素材传入 quickly-video-create:
+```
+quickly-video-create:
+  material_list: segments.map(s => ({ type: "video", value: s.videoUrl }))
+  tags: "从逐字稿提取的关键词"
+  proportion: "16:9" 或 "9:16"
+  video_duration: { min: 15, max: 30 }
+  ai_voice: 1
+  ai_bgm: 1
+```
+
+**注意:** quickly-video-create 最长 30 秒,适合将少量片段合成短视频预览。完整长视频需用户在剪映/CapCut中手动拼接。
+
+## 调用的底层 Skill
+
+| Skill | 阶段 | 用途 |
+|-------|------|------|
+| `jimeng-video-v3-720p` | Stage 2 | 文生视频 / 图生视频 |
+| `jimeng-video-v3-1080p` | Stage 2 | 1080p视频(可选) |
+| `jimeng-video-v3-pro` | Stage 2 | Pro质量视频(可选) |
+| `jimeng-img-v4` | Stage 2 | 文生图(img2video模式首帧) |
+| `jimeng-task-query` | Stage 3 | 轮询任务状态 |
+| `jimeng-work-result` | Stage 3 | 获取最终视频URL |
+| `quickly-video-create` | Stage 5 | 可选,素材合成短视频 |
+| `quickly-video-query` | Stage 5 | 可选,轮询成片结果 |
+
+## 费用估算
+
+以71个分镜段为例(按5秒/段计算):
+
+| 项目 | 单价 | 数量 | 费用 |
+|------|------|------|------|
+| jimeng-video-v3-720p | 0.28元/秒 × 5秒 = 1.4元/段 | 71段 | ≈99.4元 |
+| jimeng-img-v4(img2video模式) | 0.22元/张 | 71张 | ≈15.6元 |
+| **text2video 模式总计** | | | **≈99元** |
+| **img2video 模式总计** | | | **≈115元** |
+
+## 当前限制
+
+| 限制 | 说明 | 解决方案 |
+|------|------|---------|
+| 视频时长固定 | jimeng 只支持 5秒(121帧) 或 10秒(241帧),无法精确匹配SRT时间戳 | 用户在剪映中裁剪/变速对齐 |
+| 无TTS配音 | 无法按逐字稿自动生成语音 | 用户在剪映中录音/AI配音 |
+| 无自动拼接 | 无法将N个片段自动拼接成长视频 | 用户在剪映中拼接,或用quickly(≤30秒) |
+| 并行数限制 | 即梦API频率限制,建议≤5并行 | 分批执行,每批5个 |
+
+## 后续扩展(待新增Skill)
+
+1. **TTS配音 Skill** — 按逐字稿生成语音音频,实现自动配音
+2. **视频拼接 Skill** — FFmpeg服务端拼接,按SRT时间轴精确对齐
+3. **seeddance2.0 Skill** — 接入新一代视频生成模型,支持更长时长和更高质量
+
+## 依赖
+
+- 即梦AI视频生成接口(已有,通过 `server.fmode.cn` 代理)
+- 即梦AI Token(通过 APIG 充值获取)
+- Agent AI能力(用于分镜脚本生成)

+ 393 - 0
video-creation/transcript-to-video/api-config.json

@@ -0,0 +1,393 @@
+{
+  "name": "transcript-to-video",
+  "displayName": "閫愬瓧绋緼I瑙嗛鐢熸垚宸ヤ綔娴?,
+  "description": "杈撳叆閫愬瓧绋挎枃鏈紝AI鑷姩鎷嗗垎闀滆剼鏈紝鎵归噺璋冪敤鍗虫ⅵ瑙嗛鐢熸垚锛岃緭鍑鸿棰戠墖娈礥RL鍒楄〃+SRT瀛楀箷鏂囦欢銆傛敮鎸佹枃鐢熻棰戝拰鍏堝浘鍚庤棰戜袱绉嶆ā寮忋€?,
+  "category": "video-creation",
+  "version": "1.0.0",
+  "type": "orchestration",
+
+  "parameters": {
+    "type": "object",
+    "required": ["transcript"],
+    "properties": {
+      "transcript": {
+        "type": "string",
+        "description": "閫愬瓧绋垮叏鏂囷紙涓枃锛夛紝Agent灏嗚嚜鍔ㄦ媶鍒嗕负鍒嗛暅娈?
+      },
+      "segmentDuration": {
+        "type": "number",
+        "description": "姣忔鐩爣鏃堕暱锛堢锛夛紝褰卞搷鍒嗛暅鎷嗗垎绮掑害",
+        "default": 15
+      },
+      "videoModel": {
+        "type": "string",
+        "enum": ["720p", "1080p", "pro"],
+        "description": "瑙嗛鐢熸垚妯″瀷璐ㄩ噺绛夌骇",
+        "default": "720p"
+      },
+      "videoMethod": {
+        "type": "string",
+        "enum": ["text2video", "img2video"],
+        "description": "text2video=绾枃鐢熻棰戯紙蹇€燂級锛宨mg2video=鍏堢敓鍥惧啀鍥剧敓瑙嗛锛堟晥鏋滄洿鍙帶锛?,
+        "default": "text2video"
+      },
+      "aspectRatio": {
+        "type": "string",
+        "enum": ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"],
+        "description": "瑙嗛鐢婚潰姣斾緥",
+        "default": "16:9"
+      },
+      "frames": {
+        "type": "integer",
+        "enum": [121, 241],
+        "description": "瑙嗛甯ф暟锛?21=5绉掞紝241=10绉?,
+        "default": 121
+      }
+    }
+  },
+
+  "pipeline": [
+    {
+      "step": 1,
+      "name": "AI鍒嗛暅鑴氭湰鐢熸垚",
+      "type": "ai",
+      "description": "Agent灏嗛€愬瓧绋挎媶鍒嗕负鍒嗛暅JSON鍜孲RT瀛楀箷",
+      "aiConfig": {
+        "systemPrompt": "浣犳槸涓撲笟鐨勮棰戝垎闀滆剼鏈紪鍐欎笓瀹躲€傚皢閫愬瓧绋挎媶鍒嗕负鍒嗛暅娈碉紝姣忔绾?0-45涓腑鏂囧瓧锛堢害15绉掕閫燂級銆備负姣忔鐢熸垚鑻辨枃瑙嗛鐢熸垚鎻愮ず璇嶏紙prompt锛夛紝鎻忚堪鐢婚潰鍐呭銆侀暅澶寸被鍨嬨€佹皼鍥村拰鐢昏川銆?,
+        "userPromptTemplate": "璇峰皢浠ヤ笅閫愬瓧绋挎媶鍒嗕负鍒嗛暅鑴氭湰锛屾瘡娈电害${segmentDuration}绉掋€俓n\n閫愬瓧绋匡細\n${transcript}\n\n杈撳嚭JSON鏁扮粍鏍煎紡锛歕n[{\"id\":\"S-01\",\"act\":\"娈佃惤鍚峔",\"narration\":\"涓枃鏃佺櫧鍘熸枃\",\"type\":\"ai-gen\",\"prompt\":\"English video generation prompt with scene, camera, mood, quality keywords\",\"duration\":\"15s\"}]\n\n鍚屾椂杈撳嚭SRT瀛楀箷鏂囦欢鍐呭銆?,
+        "outputFormat": {
+          "storyboard": "Array<{id, act, narration, type, prompt, duration}>",
+          "srt": "String (SRT format subtitle content)"
+        },
+        "temperature": 0.3
+      },
+      "output": {
+        "storyboard": "鍒嗛暅JSON鏁扮粍",
+        "srt": "SRT瀛楀箷鏂囦欢鍐呭"
+      }
+    },
+    {
+      "step": 2,
+      "name": "鎵归噺鐢熸垚瑙嗛绱犳潗",
+      "type": "api",
+      "description": "瀵规瘡涓垎闀滄骞惰璋冪敤鍗虫ⅵ瑙嗛鐢熸垚API",
+      "forEach": "storyboard",
+      "forEachAs": "segment",
+      "parallel": {
+        "maxConcurrent": 5,
+        "delayMs": 1000
+      },
+      "branches": {
+        "text2video": {
+          "condition": "videoMethod === 'text2video'",
+          "steps": [
+            {
+              "id": "2a",
+              "name": "鏂囩敓瑙嗛",
+              "skill": "jimeng/jimeng-video-v3-720p",
+              "skillVariants": {
+                "720p": "jimeng/jimeng-video-v3-720p",
+                "1080p": "jimeng/jimeng-video-v3-1080p",
+                "pro": "jimeng/jimeng-video-v3-pro"
+              },
+              "input": {
+                "prompt": "${segment.prompt}",
+                "method": "1",
+                "frames": "${frames}",
+                "config": {
+                  "aspect_ratio": "${aspectRatio}"
+                }
+              },
+              "output": "workIds[${segment.id}]"
+            }
+          ]
+        },
+        "img2video": {
+          "condition": "videoMethod === 'img2video'",
+          "steps": [
+            {
+              "id": "2b-1",
+              "name": "鏂囩敓鍥撅紙棣栧抚锛?,
+              "skill": "jimeng/jimeng-img-v4",
+              "input": {
+                "prompt": "${segment.prompt}",
+                "sizeDate": {
+                  "width": "${aspectRatio === '16:9' ? 2560 : aspectRatio === '9:16' ? 1440 : 2048}",
+                  "height": "${aspectRatio === '16:9' ? 1440 : aspectRatio === '9:16' ? 2560 : 2048}"
+                }
+              },
+              "output": "imageWorkIds[${segment.id}]"
+            },
+            {
+              "id": "2b-2",
+              "name": "杞鍥剧墖缁撴灉",
+              "skill": "jimeng/jimeng-task-query",
+              "dependsOn": ["2b-1"],
+              "input": {
+                "workId": "${imageWorkIds[segment.id]}",
+                "routerName": "getImgV4"
+              },
+              "pollingConfig": {
+                "intervalMs": 3000,
+                "maxAttempts": 30,
+                "completionCondition": "data.isFinish === true"
+              }
+            },
+            {
+              "id": "2b-3",
+              "name": "鑾峰彇鍥剧墖URL",
+              "skill": "jimeng/jimeng-work-result",
+              "dependsOn": ["2b-2"],
+              "input": {
+                "workId": "${imageWorkIds[segment.id]}"
+              },
+              "output": "imageUrls[${segment.id}]",
+              "responseExtract": "images[0]"
+            },
+            {
+              "id": "2b-4",
+              "name": "鍥剧敓瑙嗛锛堥甯э級",
+              "skill": "jimeng/jimeng-video-v3-720p",
+              "dependsOn": ["2b-3"],
+              "input": {
+                "prompt": "${segment.prompt}",
+                "method": "2",
+                "frames": "${frames}",
+                "config": {
+                  "image_urls": ["${imageUrls[segment.id]}"]
+                }
+              },
+              "output": "workIds[${segment.id}]"
+            }
+          ]
+        }
+      }
+    },
+    {
+      "step": 3,
+      "name": "杞瑙嗛鐢熸垚缁撴灉",
+      "type": "api",
+      "forEach": "workIds",
+      "forEachAs": "workId",
+      "parallel": {
+        "maxConcurrent": 10,
+        "delayMs": 500
+      },
+      "steps": [
+        {
+          "id": "3a",
+          "name": "杞浠诲姟鐘舵€?,
+          "skill": "jimeng/jimeng-task-query",
+          "input": {
+            "workId": "${workId}",
+            "routerName": "${videoModel === '720p' ? 'getVideoV3_720p' : videoModel === '1080p' ? 'getVideoV3_1080p' : 'getVideoV3_Pro'}"
+          },
+          "pollingConfig": {
+            "intervalMs": 5000,
+            "maxAttempts": 60,
+            "completionCondition": "data.isFinish === true",
+            "timeoutMs": 300000
+          }
+        },
+        {
+          "id": "3b",
+          "name": "鑾峰彇瑙嗛URL",
+          "skill": "jimeng/jimeng-work-result",
+          "dependsOn": ["3a"],
+          "input": {
+            "workId": "${workId}"
+          },
+          "output": "videoResults[${segmentId}]",
+          "responseExtract": {
+            "videoUrl": "videos[0]",
+            "images": "images"
+          }
+        }
+      ]
+    },
+    {
+      "step": 4,
+      "name": "缁撴灉姹囨€?,
+      "type": "compute",
+      "logic": "aggregateResults(storyboard, srt, videoResults)",
+      "algorithm": {
+        "merge": "灏嗗垎闀淛SON涓庤棰慤RL鍚堝苟",
+        "stats": "缁熻鎴愬姛/澶辫触鏁伴噺",
+        "failedRetry": "澶辫触鐨勫垎闀滄鏍囪涓篺ailedIds锛屽彲閲嶈瘯"
+      },
+      "output": "finalOutput"
+    },
+    {
+      "step": 5,
+      "name": "鍙€夛細涓€閿垚鐗?,
+      "type": "api",
+      "optional": true,
+      "condition": "user requests quick compilation && successCount <= 50 && totalDuration <= 30",
+      "skill": "video-creation/quickly-video-create",
+      "input": {
+        "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 },
+        "pre_id": "${Date.now().toString()}",
+        "ai_voice": 1,
+        "ai_bgm": 1,
+        "ai_subtitle": 1
+      },
+      "output": "quicklyTaskId",
+      "downstream": "video-creation/quickly-video-query"
+    }
+  ],
+
+  "response": {
+    "type": "object",
+    "properties": {
+      "storyboard": {
+        "type": "array",
+        "description": "鍒嗛暅鑴氭湰JSON",
+        "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锛坕mg2video妯″紡锛? }
+          }
+        }
+      },
+      "srt": {
+        "type": "string",
+        "description": "SRT瀛楀箷鏂囦欢鍐呭"
+      },
+      "segments": {
+        "type": "array",
+        "description": "瑙嗛鐗囨姹囨€?,
+        "items": {
+          "type": "object",
+          "properties": {
+            "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" } }
+    }
+  },
+
+  "relatedSkills": [
+    "jimeng/jimeng-video-v3-720p",
+    "jimeng/jimeng-video-v3-1080p",
+    "jimeng/jimeng-video-v3-pro",
+    "jimeng/jimeng-img-v4",
+    "jimeng/jimeng-task-query",
+    "jimeng/jimeng-work-result",
+    "video-creation/quickly-video-create",
+    "video-creation/quickly-video-query"
+  ],
+
+  "pricing": {
+    "text2video_720p_5s": {
+      "perSegment": 1.4,
+      "unit": "CNY",
+      "formula": "0.28鍏?绉?脳 5绉?
+    },
+    "text2video_720p_10s": {
+      "perSegment": 2.8,
+      "unit": "CNY",
+      "formula": "0.28鍏?绉?脳 10绉?
+    },
+    "img2video_720p_5s": {
+      "perSegment": 1.62,
+      "unit": "CNY",
+      "formula": "0.22鍏?鍥? + 0.28鍏?绉捗?绉?瑙嗛)"
+    },
+    "example_71segments_5s": {
+      "text2video": "鈮?9鍏?,
+      "img2video": "鈮?15鍏?
+    }
+  },
+
+  "limitations": {
+    "videoDuration": "浠呮敮鎸?绉?121甯?鎴?0绉?241甯?锛屾棤娉曠簿纭尮閰峉RT鏃堕棿鎴?,
+    "noTTS": "鏃燭TS閰嶉煶鑳藉姏锛岄渶鐢ㄦ埛鍦ㄥ壀鏄犱腑閰嶉煶",
+    "noAutoStitch": "鏃犺嚜鍔ㄦ嫾鎺ラ暱瑙嗛鑳藉姏锛宷uickly鏈€闀?0绉?,
+    "parallelLimit": "鍗虫ⅵAPI寤鸿鈮?骞惰锛岄伩鍏嶉鐜囬檺鍒?
+  },
+
+  "futureExtensions": [
+    {
+      "name": "tts-voiceover",
+      "description": "TTS閰嶉煶Skill锛氭寜閫愬瓧绋跨敓鎴愯闊抽煶棰?,
+      "status": "planned"
+    },
+    {
+      "name": "video-stitch",
+      "description": "瑙嗛鎷兼帴Skill锛欶Fmpeg鏈嶅姟绔寜SRT鏃堕棿杞寸簿纭嫾鎺?,
+      "status": "planned"
+    },
+    {
+      "name": "seeddance-video",
+      "description": "seeddance2.0妯″瀷鎺ュ叆锛氭洿楂樿川閲忚棰戠敓鎴?,
+      "status": "planned"
+    }
+  ],
+
+  "tokenConfig": {
+    "type": "body",
+    "tokenField": "token",
+    "format": "Bearer r:{{jimengToken}}",
+    "configFile": "~/.openclaw/voc-credentials.json",
+    "currentToken": "Bearer r:f0333969e312a40e4703e8fe4ed1c600",
+    "resolutionOrder": ["configFile", "currentToken"],
+    "onMissing": {
+      "action": "showPaymentQR",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
+      "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
+      "pollingIntervalMs": 3000,
+      "pollingTimeoutMs": 300000,
+      "onPaymentSuccess": "retrySkillWithNewToken",
+      "title": "鎵爜寮€閫氬嵆姊I瑙嗛鐢熸垚鏈嶅姟",
+      "message": "璇锋壂鎻忎笅鏂逛簩缁寸爜瀹屾垚鏀粯锛屾敮浠樻垚鍔熷悗灏嗚嚜鍔ㄨ幏鍙?Token 骞剁户缁墽琛屻€?
+    },
+    "onBalanceInsufficient": {
+      "action": "showPaymentQR",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
+      "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
+      "pollingIntervalMs": 3000,
+      "pollingTimeoutMs": 300000,
+      "onPaymentSuccess": "retrySkillWithNewToken",
+      "title": "鍗虫ⅵ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"] }
+      ],
+      "matchMode": "any",
+      "trigger": "tokenConfig.onBalanceInsufficient"
+    },
+    "segmentFailed": {
+      "action": "markFailed",
+      "description": "鍗曚釜鍒嗛暅娈电敓鎴愬け璐ユ椂鏍囪涓篺ailed锛屼笉闃诲鍏朵粬娈碉紝鏈€鍚庢眹鎬诲け璐ュ垪琛ㄤ緵閲嶈瘯"
+    }
+  },
+
+  "timeout": 600000,
+  "retry": {
+    "maxAttempts": 2,
+    "delay": 3000,
+    "backoffMultiplier": 2
+  }
+}

+ 2 - 2
voc/asin-reverse-keywords/api-config.json

@@ -101,7 +101,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -111,7 +111,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/asin-sales-volume/api-config.json

@@ -103,7 +103,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -113,7 +113,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/category-products/api-config.json

@@ -115,7 +115,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -125,7 +125,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/category-tree/api-config.json

@@ -87,7 +87,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -97,7 +97,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/keyword-product-ranking/api-config.json

@@ -112,7 +112,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -122,7 +122,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/keyword-search-trend/api-config.json

@@ -101,7 +101,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -111,7 +111,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/keyword-search/api-config.json

@@ -108,7 +108,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -118,7 +118,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/product-detail-query/api-config.json

@@ -225,7 +225,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -235,7 +235,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/product-monitor/api-config.json

@@ -100,7 +100,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -110,7 +110,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/product-reviews-query/api-config.json

@@ -220,7 +220,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -230,7 +230,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/product-search/api-config.json

@@ -141,7 +141,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -151,7 +151,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 2 - 2
voc/similar-products/api-config.json

@@ -92,7 +92,7 @@
     "resolutionOrder": ["configFile", "currentToken"],
     "onMissing": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,
@@ -102,7 +102,7 @@
     },
     "onBalanceInsufficient": {
       "action": "showPaymentQR",
-      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?authid=T0iOotHcDX",
+      "qrCodeUrl": "https://payment.brainhack.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
       "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
       "pollingIntervalMs": 3000,
       "pollingTimeoutMs": 300000,

+ 315 - 0
workflows/transcript_to_video.workflow.json

@@ -0,0 +1,315 @@
+{
+  "name": "transcript_to_video",
+  "displayName": "逐字稿AI视频生成",
+  "description": "端到端编排:从输入逐字稿文本,到AI拆分镜脚本、批量生成视频素材、汇总输出视频URL列表+SRT字幕文件。覆盖分镜生成、文生视频/图生视频、任务轮询、结果汇总的完整链路。",
+  "version": "1.0.0",
+
+  "input": {
+    "type": "object",
+    "required": ["transcript"],
+    "properties": {
+      "transcript": {
+        "type": "string",
+        "description": "逐字稿全文(中文),将被AI拆分为分镜段",
+        "example": "回到开头那个数字,500美元。这个数字之所以让人震撼不是因为它小,而是因为它背后站着的是一个人用了几年的时间在没有任何文档没有任何团队支援的黑暗中..."
+      },
+      "segmentDuration": {
+        "type": "number",
+        "description": "每段目标时长(秒),影响分镜拆分粒度",
+        "default": 15
+      },
+      "videoModel": {
+        "type": "string",
+        "enum": ["720p", "1080p", "pro"],
+        "description": "视频生成模型:720p(默认,性价比最高) / 1080p(高清) / pro(最高质量)",
+        "default": "720p"
+      },
+      "videoMethod": {
+        "type": "string",
+        "enum": ["text2video", "img2video"],
+        "description": "text2video=纯文生视频(快速省钱),img2video=先生图再图生视频(效果更可控)",
+        "default": "text2video"
+      },
+      "aspectRatio": {
+        "type": "string",
+        "enum": ["16:9", "9:16", "1:1", "4:3"],
+        "description": "视频画面比例,16:9横屏(默认) / 9:16竖屏(抖音) / 1:1方形",
+        "default": "16:9"
+      },
+      "frames": {
+        "type": "integer",
+        "enum": [121, 241],
+        "description": "视频帧数:121=5秒(默认) / 241=10秒",
+        "default": 121
+      }
+    }
+  },
+
+  "stages": [
+    {
+      "id": "stage_1",
+      "name": "AI分镜脚本生成",
+      "description": "Agent将逐字稿拆分为分镜JSON数组 + SRT字幕文件",
+      "parallel": false,
+      "steps": [
+        {
+          "id": "1.1",
+          "name": "逐字稿拆分为分镜脚本",
+          "type": "ai",
+          "aiConfig": {
+            "systemPrompt": "你是专业的视频分镜脚本编写专家。将逐字稿拆分为分镜段,每段约40-45个中文字(约15秒语速)。为每段生成英文视频生成提示词(prompt),描述画面内容、镜头类型、氛围和画质。prompt必须是英文,要具体、富有画面感、适合AI视频生成。",
+            "userPromptTemplate": "请将以下逐字稿拆分为分镜脚本,每段约{{input.segmentDuration}}秒(约40-45个中文字)。\n\n逐字稿:\n{{input.transcript}}\n\n请输出两部分:\n\n**Part 1: 分镜JSON**\n```json\n[\n  {\n    \"id\": \"S-01\",\n    \"act\": \"段落名称\",\n    \"narration\": \"中文旁白原文(从逐字稿截取)\",\n    \"type\": \"ai-gen\",\n    \"prompt\": \"Detailed English prompt for AI video generation. Include: camera movement, scene description, lighting, mood, style. End with quality keywords like 'Cinematic 4K, dramatic lighting'\",\n    \"duration\": \"15s\"\n  }\n]\n```\n\n**Part 2: SRT字幕**\n```srt\n1\n00:00:00,000 --> 00:00:15,000\n中文旁白原文\n\n2\n00:00:15,000 --> 00:00:30,000\n...\n```",
+            "temperature": 0.3,
+            "maxTokens": 8000
+          },
+          "output": {
+            "storyboard": "分镜JSON数组",
+            "srt": "SRT字幕文件内容"
+          },
+          "description": "Agent解析逐字稿,生成带英文prompt的分镜脚本和SRT字幕"
+        }
+      ],
+      "aggregation": {
+        "output": "storyboardData",
+        "fields": ["storyboard", "srt"]
+      }
+    },
+    {
+      "id": "stage_2",
+      "name": "批量生成视频素材",
+      "description": "对每个分镜段调用即梦API生成视频素材,支持text2video和img2video两种模式",
+      "dependsOn": ["stage_1"],
+      "parallel": true,
+      "steps": [
+        {
+          "id": "2.1",
+          "name": "文生图(img2video模式首帧)",
+          "condition": "input.videoMethod === 'img2video'",
+          "skill": "jimeng-img-v4",
+          "iterate": "storyboardData.storyboard",
+          "iterateAs": "segment",
+          "input": {
+            "prompt": "{{segment.prompt}}",
+            "sizeDate": {
+              "width": "{{input.aspectRatio === '16:9' ? 2560 : input.aspectRatio === '9:16' ? 1440 : 2048}}",
+              "height": "{{input.aspectRatio === '16:9' ? 1440 : input.aspectRatio === '9:16' ? 2560 : 2048}}"
+            }
+          },
+          "output": "imageWorkIds[{{segment.id}}]",
+          "rateLimit": { "maxConcurrent": 5, "delayMs": 1000 },
+          "description": "为每个分镜段生成首帧图片(仅img2video模式)"
+        },
+        {
+          "id": "2.2",
+          "name": "轮询图片生成结果",
+          "condition": "input.videoMethod === 'img2video'",
+          "skill": "jimeng-task-query",
+          "dependsOn": ["2.1"],
+          "iterate": "imageWorkIds",
+          "iterateAs": "workId",
+          "input": {
+            "workId": "{{workId}}",
+            "routerName": "getImgV4"
+          },
+          "pollingConfig": {
+            "intervalMs": 3000,
+            "maxAttempts": 30,
+            "completionCondition": "data.isFinish === true"
+          },
+          "description": "每3秒轮询一次图片生成状态"
+        },
+        {
+          "id": "2.3",
+          "name": "获取图片URL",
+          "condition": "input.videoMethod === 'img2video'",
+          "skill": "jimeng-work-result",
+          "dependsOn": ["2.2"],
+          "iterate": "imageWorkIds",
+          "iterateAs": "workId",
+          "input": {
+            "workId": "{{workId}}"
+          },
+          "output": "imageUrls[{{segmentId}}]",
+          "responseExtract": "images[0]",
+          "description": "获取生成的图片永久URL作为视频首帧"
+        },
+        {
+          "id": "2.4",
+          "name": "生成视频(text2video或img2video)",
+          "skill": "jimeng-video-v3-720p",
+          "skillSelector": {
+            "720p": "jimeng-video-v3-720p",
+            "1080p": "jimeng-video-v3-1080p",
+            "pro": "jimeng-video-v3-pro"
+          },
+          "skillSelectorKey": "input.videoModel",
+          "dependsOn": ["2.3"],
+          "iterate": "storyboardData.storyboard",
+          "iterateAs": "segment",
+          "input": {
+            "prompt": "{{segment.prompt}}",
+            "method": "{{input.videoMethod === 'img2video' ? '2' : '1'}}",
+            "frames": "{{input.frames}}",
+            "config": {
+              "aspect_ratio": "{{input.aspectRatio}}",
+              "image_urls": "{{input.videoMethod === 'img2video' ? [imageUrls[segment.id]] : undefined}}"
+            }
+          },
+          "output": "videoWorkIds[{{segment.id}}]",
+          "rateLimit": { "maxConcurrent": 5, "delayMs": 1000 },
+          "description": "为每个分镜段生成视频。text2video用method=1,img2video用method=2+首帧图"
+        }
+      ],
+      "aggregation": {
+        "output": "generationResults",
+        "fields": ["videoWorkIds", "imageUrls"]
+      }
+    },
+    {
+      "id": "stage_3",
+      "name": "轮询视频生成结果",
+      "description": "轮询所有视频生成任务,获取最终视频URL",
+      "dependsOn": ["stage_2"],
+      "parallel": true,
+      "steps": [
+        {
+          "id": "3.1",
+          "name": "轮询视频任务状态",
+          "skill": "jimeng-task-query",
+          "iterate": "generationResults.videoWorkIds",
+          "iterateAs": "entry",
+          "input": {
+            "workId": "{{entry.workId}}",
+            "routerName": "{{input.videoModel === '720p' ? 'getVideoV3_720p' : input.videoModel === '1080p' ? 'getVideoV3_1080p' : 'getVideoV3_Pro'}}"
+          },
+          "pollingConfig": {
+            "intervalMs": 5000,
+            "maxAttempts": 60,
+            "completionCondition": "data.isFinish === true",
+            "timeoutMs": 300000
+          },
+          "rateLimit": { "maxConcurrent": 10, "delayMs": 500 },
+          "description": "每5秒轮询一次视频生成状态,最多5分钟"
+        },
+        {
+          "id": "3.2",
+          "name": "获取视频URL",
+          "skill": "jimeng-work-result",
+          "dependsOn": ["3.1"],
+          "iterate": "generationResults.videoWorkIds",
+          "iterateAs": "entry",
+          "input": {
+            "workId": "{{entry.workId}}"
+          },
+          "output": "videoResults[{{entry.segmentId}}]",
+          "responseExtract": {
+            "videoUrl": "videos[0]",
+            "images": "images"
+          },
+          "description": "获取生成的视频永久URL"
+        }
+      ],
+      "aggregation": {
+        "output": "allVideoResults",
+        "logic": "合并所有视频结果,按分镜段ID排序"
+      }
+    },
+    {
+      "id": "stage_4",
+      "name": "结果汇总与输出",
+      "description": "汇总所有生成结果,合并分镜脚本与视频URL,统计成功/失败",
+      "dependsOn": ["stage_3"],
+      "parallel": false,
+      "steps": [
+        {
+          "id": "4.1",
+          "name": "合并分镜与视频结果",
+          "type": "compute",
+          "logic": "mergeStoryboardWithVideos(storyboardData, allVideoResults, imageUrls)",
+          "algorithm": {
+            "merge": "将每个分镜段的videoUrl和imageUrl写入对应的storyboard item",
+            "stats": "统计 totalSegments, successCount, failedCount, failedIds",
+            "sort": "按分镜ID排序确保顺序正确",
+            "srtUpdate": "如果视频实际时长与SRT不同,标注差异供用户参考"
+          },
+          "output": "finalOutput",
+          "description": "生成最终输出:带videoUrl的分镜JSON + SRT字幕 + 统计信息"
+        }
+      ]
+    },
+    {
+      "id": "stage_5",
+      "name": "可选:一键成片",
+      "description": "将生成的视频素材通过Quickly AI合成短视频(最长30秒)",
+      "dependsOn": ["stage_4"],
+      "optional": true,
+      "condition": "用户明确要求一键成片 && finalOutput.successCount <= 50",
+      "steps": [
+        {
+          "id": "5.1",
+          "name": "提交一键成片任务",
+          "skill": "quickly-video-create",
+          "input": {
+            "material_list": "{{finalOutput.segments.filter(s => s.videoUrl).map(s => ({ type: 'video', value: s.videoUrl }))}}",
+            "tags": "{{extractKeywordsFromTranscript(input.transcript)}}",
+            "proportion": "{{input.aspectRatio === '16:9' ? '9:16' : input.aspectRatio}}",
+            "video_duration": { "min": 15, "max": 30 },
+            "pre_id": "{{Date.now().toString()}}",
+            "ai_voice": 1,
+            "ai_bgm": 1,
+            "ai_subtitle": 1
+          },
+          "output": "quicklyTaskId",
+          "description": "将视频素材提交Quickly AI合成短视频(注意:最长30秒限制)"
+        },
+        {
+          "id": "5.2",
+          "name": "轮询成片结果",
+          "skill": "quickly-video-query",
+          "dependsOn": ["5.1"],
+          "input": {
+            "taskId": "{{quicklyTaskId}}"
+          },
+          "pollingConfig": {
+            "intervalMs": 15000,
+            "maxAttempts": 40,
+            "completionCondition": "data.length > 0"
+          },
+          "output": "quicklyResult",
+          "description": "每15秒轮询,最多10分钟"
+        }
+      ]
+    }
+  ],
+
+  "output": {
+    "type": "object",
+    "description": "工作流最终输出",
+    "properties": {
+      "storyboard": "带videoUrl的完整分镜JSON",
+      "srt": "SRT字幕文件内容",
+      "segments": "视频片段URL列表(按顺序)",
+      "totalSegments": "总分镜段数",
+      "successCount": "成功生成的视频数",
+      "failedCount": "失败的视频数",
+      "failedIds": "失败的分镜段ID列表(可重试)",
+      "quicklyResult": "(可选)一键成片结果"
+    }
+  },
+
+  "estimatedTime": {
+    "stage_1": "10-30秒(AI生成分镜)",
+    "stage_2_text2video": "1-3分钟/5段并行(视频生成)",
+    "stage_2_img2video": "2-5分钟/5段并行(图片+视频)",
+    "stage_3": "与stage_2重叠(轮询)",
+    "stage_4": "< 1秒(汇总)",
+    "total_20segments": "约3-8分钟",
+    "total_71segments": "约10-25分钟"
+  },
+
+  "userDelivery": {
+    "immediate": "视频片段URL列表 + SRT字幕文件 + 分镜脚本JSON",
+    "userAction": "导入剪映/CapCut → 按SRT时间轴排列视频 → 配音 → 成片",
+    "optional": "一键成片(≤30秒短视频预览)"
+  }
+}