| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- {
- "name": "jimeng-oh-detect",
- "displayName": "数字人v1.5-主体检测",
- "description": "数字人v1.5步骤2:检测图片中的主体并返回mask图(可选步骤)。",
- "category": "jimeng",
- "version": "1.0.0",
- "endpoint": {
- "method": "POST",
- "url": "https://server.fmode.cn/api/volcengine/jimeng/getOhDetectMain",
- "headers": {
- "Content-Type": "application/json"
- }
- },
- "parameters": {
- "type": "object",
- "required": [
- "token"
- ],
- "properties": {
- "workId": {
- "type": "string",
- "description": "步骤1的workId,与taskId二选一"
- },
- "taskId": {
- "type": "string",
- "description": "任务ID,与workId二选一"
- },
- "token": {
- "type": "string",
- "description": "认证token"
- }
- }
- },
- "response": {
- "type": "object",
- "properties": {
- "code": {
- "type": "integer"
- },
- "data": {
- "type": "object",
- "properties": {
- "tip": {
- "type": "string"
- },
- "isContinue": {
- "type": "boolean"
- },
- "isFinish": {
- "type": "boolean"
- }
- }
- }
- }
- },
- "usageExamples": [
- {
- "name": "检测主体",
- "input": {
- "workId": "qH58sm1wMr",
- "token": "Bearer r:xxx"
- },
- "description": "检测步骤1中图片的主体,获取mask图"
- }
- ],
- "notes": "mask图URL有效期仅1小时。此步骤可跳过,直接进行步骤3视频生成。",
- "relatedSkills": [
- "jimeng-oh-identify",
- "jimeng-oh-generate",
- "jimeng-oh-query"
- ],
- "timeout": 30000,
- "tokenConfig": {
- "type": "body",
- "tokenField": "token",
- "format": "Bearer r:{{jimengToken}}",
- "configFile": "~/.openclaw/voc-credentials.json",
- "currentToken": "r:f0333969e312a40e4703e8fe4ed1c600",
- "resolutionOrder": [
- "configFile",
- "currentToken"
- ],
- "onMissing": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://pwa.fmode.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生成服务",
- "message": "请扫描下方二维码完成支付,支付成功后将自动获取 Token 并继续执行。"
- },
- "onBalanceInsufficient": {
- "action": "showPaymentQR",
- "qrCodeUrl": "https://pwa.fmode.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"
- ]
- },
- {
- "responseField": "message",
- "operator": "contains",
- "value": [
- "余额不足",
- "insufficient",
- "balance"
- ]
- }
- ],
- "matchMode": "any",
- "trigger": "tokenConfig.onBalanceInsufficient"
- },
- "unauthorized": {
- "conditions": [
- {
- "responseField": "code",
- "operator": "in",
- "value": [
- 401,
- 403
- ]
- },
- {
- "responseField": "msg",
- "operator": "contains",
- "value": [
- "unauthorized",
- "token",
- "invalid",
- "auth"
- ]
- }
- ],
- "matchMode": "any",
- "trigger": "tokenConfig.onMissing"
- }
- }
- }
|