api-config.json 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. {
  2. "name": "jimeng-actor-v2",
  3. "displayName": "动作模仿2.0",
  4. "description": "新一代视频动作模仿大模型,支持多人驱动和非真人驱动视频。",
  5. "category": "jimeng",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "https://server.fmode.cn/api/volcengine/jimeng/getActorV2",
  10. "headers": {
  11. "Content-Type": "application/json"
  12. }
  13. },
  14. "parameters": {
  15. "type": "object",
  16. "required": [
  17. "image_url",
  18. "video_url",
  19. "token"
  20. ],
  21. "properties": {
  22. "image_url": {
  23. "type": "string",
  24. "description": "图片URL"
  25. },
  26. "video_url": {
  27. "type": "string",
  28. "description": "模版视频URL"
  29. },
  30. "cut_result_first_second_switch": {
  31. "type": "boolean",
  32. "description": "是否裁剪结果视频第1秒,默认true",
  33. "default": true
  34. },
  35. "callback_url": {
  36. "type": "string",
  37. "description": "回调接口URL"
  38. },
  39. "token": {
  40. "type": "string",
  41. "description": "认证token"
  42. }
  43. }
  44. },
  45. "response": {
  46. "type": "object",
  47. "properties": {
  48. "code": {
  49. "type": "integer"
  50. },
  51. "data": {
  52. "type": "object",
  53. "properties": {
  54. "workId": {
  55. "type": "string"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "usageExamples": [
  62. {
  63. "name": "人物动作模仿v2",
  64. "input": {
  65. "image_url": "https://example.com/person.jpg",
  66. "video_url": "https://example.com/dance.mp4",
  67. "cut_result_first_second_switch": false,
  68. "token": "Bearer r:xxx"
  69. },
  70. "description": "使用2.0模型驱动图片人物按视频动作运动"
  71. }
  72. ],
  73. "relatedSkills": [
  74. "jimeng-task-query",
  75. "jimeng-actor"
  76. ],
  77. "pricing": {
  78. "unit": "秒",
  79. "price": 0.4,
  80. "currency": "CNY",
  81. "reference": "https://www.volcengine.com/docs/85621/2205633"
  82. },
  83. "timeout": 30000,
  84. "tokenConfig": {
  85. "type": "body",
  86. "tokenField": "token",
  87. "format": "Bearer r:{{jimengToken}}",
  88. "configFile": "~/.openclaw/voc-credentials.json",
  89. "currentToken": "r:f0333969e312a40e4703e8fe4ed1c600",
  90. "resolutionOrder": [
  91. "configFile",
  92. "currentToken"
  93. ],
  94. "onMissing": {
  95. "action": "showPaymentQR",
  96. "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
  97. "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
  98. "pollingIntervalMs": 3000,
  99. "pollingTimeoutMs": 300000,
  100. "onPaymentSuccess": "retrySkillWithNewToken",
  101. "title": "扫码开通即梦AI生成服务",
  102. "message": "请扫描下方二维码完成支付,支付成功后将自动获取 Token 并继续执行。"
  103. },
  104. "onBalanceInsufficient": {
  105. "action": "showPaymentQR",
  106. "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
  107. "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
  108. "pollingIntervalMs": 3000,
  109. "pollingTimeoutMs": 300000,
  110. "onPaymentSuccess": "retrySkillWithNewToken",
  111. "title": "即梦AI Token 余额不足,请扫码充值",
  112. "message": "当前 Token 余额不足,请扫描二维码充值,支付完成后将自动继续执行。"
  113. }
  114. },
  115. "errorHandling": {
  116. "balanceInsufficient": {
  117. "conditions": [
  118. {
  119. "responseField": "code",
  120. "operator": "in",
  121. "value": [
  122. -2,
  123. -3,
  124. -10,
  125. 402,
  126. 429
  127. ]
  128. },
  129. {
  130. "responseField": "msg",
  131. "operator": "contains",
  132. "value": [
  133. "余额不足",
  134. "insufficient",
  135. "balance",
  136. "quota"
  137. ]
  138. },
  139. {
  140. "responseField": "message",
  141. "operator": "contains",
  142. "value": [
  143. "余额不足",
  144. "insufficient",
  145. "balance"
  146. ]
  147. }
  148. ],
  149. "matchMode": "any",
  150. "trigger": "tokenConfig.onBalanceInsufficient"
  151. },
  152. "unauthorized": {
  153. "conditions": [
  154. {
  155. "responseField": "code",
  156. "operator": "in",
  157. "value": [
  158. 401,
  159. 403
  160. ]
  161. },
  162. {
  163. "responseField": "msg",
  164. "operator": "contains",
  165. "value": [
  166. "unauthorized",
  167. "token",
  168. "invalid",
  169. "auth"
  170. ]
  171. }
  172. ],
  173. "matchMode": "any",
  174. "trigger": "tokenConfig.onMissing"
  175. }
  176. }
  177. }