api-config.json 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. {
  2. "name": "jimeng-oh-generate",
  3. "displayName": "数字人v1.5-视频生成",
  4. "description": "OmniHuman1.5数字人模型,根据单张图片+音频生成高质量数字人视频。",
  5. "category": "jimeng",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "https://server.fmode.cn/api/volcengine/jimeng/getOmniHuman",
  10. "headers": {
  11. "Content-Type": "application/json"
  12. }
  13. },
  14. "parameters": {
  15. "type": "object",
  16. "required": [
  17. "audio_url",
  18. "token"
  19. ],
  20. "properties": {
  21. "workId": {
  22. "type": "string",
  23. "description": "步骤1的workId,与taskId二选一"
  24. },
  25. "taskId": {
  26. "type": "string",
  27. "description": "任务ID,与workId二选一"
  28. },
  29. "audio_url": {
  30. "type": "string",
  31. "description": "音频URL"
  32. },
  33. "prompt": {
  34. "type": "string",
  35. "description": "提示词,调整画面/动作/运镜"
  36. },
  37. "pe_fast_mode": {
  38. "type": "boolean",
  39. "description": "快速模式,默认false",
  40. "default": false
  41. },
  42. "mask_url": {
  43. "type": "array",
  44. "items": {
  45. "type": "string"
  46. },
  47. "description": "掩码图URL列表,指定讲话主体"
  48. },
  49. "token": {
  50. "type": "string",
  51. "description": "认证token"
  52. }
  53. }
  54. },
  55. "response": {
  56. "type": "object",
  57. "properties": {
  58. "code": {
  59. "type": "integer"
  60. },
  61. "data": {
  62. "type": "object",
  63. "properties": {
  64. "tip": {
  65. "type": "string"
  66. },
  67. "isContinue": {
  68. "type": "boolean"
  69. },
  70. "isFinish": {
  71. "type": "boolean"
  72. }
  73. }
  74. }
  75. }
  76. },
  77. "usageExamples": [
  78. {
  79. "name": "数字人朗读",
  80. "input": {
  81. "workId": "qH58sm1wMr",
  82. "audio_url": "https://example.com/speech.mp3",
  83. "prompt": "数字人朗读测试",
  84. "pe_fast_mode": false,
  85. "mask_url": [],
  86. "token": "Bearer r:xxx"
  87. },
  88. "description": "驱动图片中的人物按音频朗读"
  89. }
  90. ],
  91. "relatedSkills": [
  92. "jimeng-oh-identify",
  93. "jimeng-oh-detect",
  94. "jimeng-oh-query"
  95. ],
  96. "pricing": {
  97. "unit": "秒",
  98. "price": 1,
  99. "currency": "CNY",
  100. "reference": "https://www.volcengine.com/docs/85621/1834143"
  101. },
  102. "timeout": 30000,
  103. "tokenConfig": {
  104. "type": "body",
  105. "tokenField": "token",
  106. "format": "Bearer r:{{jimengToken}}",
  107. "configFile": "~/.openclaw/voc-credentials.json",
  108. "currentToken": "r:f0333969e312a40e4703e8fe4ed1c600",
  109. "resolutionOrder": [
  110. "configFile",
  111. "currentToken"
  112. ],
  113. "onMissing": {
  114. "action": "showPaymentQR",
  115. "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
  116. "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
  117. "pollingIntervalMs": 3000,
  118. "pollingTimeoutMs": 300000,
  119. "onPaymentSuccess": "retrySkillWithNewToken",
  120. "title": "扫码开通即梦AI生成服务",
  121. "message": "请扫描下方二维码完成支付,支付成功后将自动获取 Token 并继续执行。"
  122. },
  123. "onBalanceInsufficient": {
  124. "action": "showPaymentQR",
  125. "qrCodeUrl": "https://pwa.fmode.cn/apig-pay.html?user={{user}}&apigid={{apigid}}&fun_id=HOkkX72PMF",
  126. "paymentCheckEndpoint": "https://server.fmode.cn/api/apig/getApig",
  127. "pollingIntervalMs": 3000,
  128. "pollingTimeoutMs": 300000,
  129. "onPaymentSuccess": "retrySkillWithNewToken",
  130. "title": "即梦AI Token 余额不足,请扫码充值",
  131. "message": "当前 Token 余额不足,请扫描二维码充值,支付完成后将自动继续执行。"
  132. }
  133. },
  134. "errorHandling": {
  135. "balanceInsufficient": {
  136. "conditions": [
  137. {
  138. "responseField": "code",
  139. "operator": "in",
  140. "value": [
  141. -2,
  142. -3,
  143. -10,
  144. 402,
  145. 429
  146. ]
  147. },
  148. {
  149. "responseField": "msg",
  150. "operator": "contains",
  151. "value": [
  152. "余额不足",
  153. "insufficient",
  154. "balance",
  155. "quota"
  156. ]
  157. },
  158. {
  159. "responseField": "message",
  160. "operator": "contains",
  161. "value": [
  162. "余额不足",
  163. "insufficient",
  164. "balance"
  165. ]
  166. }
  167. ],
  168. "matchMode": "any",
  169. "trigger": "tokenConfig.onBalanceInsufficient"
  170. },
  171. "unauthorized": {
  172. "conditions": [
  173. {
  174. "responseField": "code",
  175. "operator": "in",
  176. "value": [
  177. 401,
  178. 403
  179. ]
  180. },
  181. {
  182. "responseField": "msg",
  183. "operator": "contains",
  184. "value": [
  185. "unauthorized",
  186. "token",
  187. "invalid",
  188. "auth"
  189. ]
  190. }
  191. ],
  192. "matchMode": "any",
  193. "trigger": "tokenConfig.onMissing"
  194. }
  195. }
  196. }