返回顶部
r

runninghub_apiRunningHub API调用

RunningHub AI Platform 直接调用 - 文生图、图生图、视频生成等,支持智能存储判断和链式工作流

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
104
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

runninghub_api

RunningHub API 技能

概述

直接调用 RunningHub API,支持生图、生视频、音频处理等 AI 任务。

与 RHMCP 的关系

  • - RHMCP 是 MCP 服务器,提供 STDIO/HTTP 接口
  • 本技能直接复用 RHMCP 的 API 客户端,跳过 MCP 层,速度更快
  • 支持 RHMCP 配置文件中定义的 APP

前置条件

  1. 1. RunningHub 账号
- 注册:https://www.runninghub.cn(国内)或 https://www.runninghub.ai(国际) - 获取 API 密钥:个人中心 → API 控制台
  1. 2. 百度网盘(可选,用于云存储)
- 安装 bdpan-storage 技能 - 执行登录:bash ~/.agents/skills/bdpan-storage/scripts/login.sh
  1. 3. Google Drive(可选,用于云存储)
- 安装 gog 技能 - 执行授权:gog auth credentials /path/to/client_secret.json

配置

环境变量

bash
export RUNNINGHUBAPIKEY=your-api-key
export RUNNINGHUBBASEURL=www.runninghub.cn # 或 www.runninghub.ai

OpenClaw 配置

编辑 ~/.openclaw/openclaw.json:

json5
{
skills: {
entries: {
runninghub-api: {
enabled: true,
env: {
RUNNINGHUBAPIKEY: your-api-key,
RUNNINGHUBBASEURL: www.runninghub.cn,
},
config: {
defaultStorage: auto, // auto/none/cloud
defaultCloudProvider: auto, // auto/bdpan/gog
}
}
}
}
}

存储模式

模式说明触发条件
none返回 RH 服务器 URL默认、直接交付、链式流程
cloud
上传到网盘 | 明确要求保存、需要确认 | | ~~local~~ | ~~下载到本地~~ | ~~服务器不适用,禁用~~ |

自动决策逻辑

javascript
if (storage === auto) {
if (链式流程 || 直接交付) → none
else if (要求保存 || 需要确认) → cloud
else → none
}

if (cloudProvider === auto) {
if (提到 Google/Sheet) → gog
else → bdpan
}

路径规则

  • - bdpan: runninghub/{projectName}/{timestamp}{filename}
  • gog: RunningHub/{projectName}/{timestamp}{filename}
  • 项目名: 用户指定 > 自动生成(rh-{timestamp})

工具

rhlistapps

列出可用的 RunningHub APP。

javascript
rhlistapps({ refresh: false })
// 返回: { apps: [{ alias, appId, category, description }] }

rh_execute

执行 APP 任务。

javascript
rh_execute({
alias: string, // APP 别名
params: Record, // APP 参数
storage?: none | cloud | auto,
cloudProvider?: bdpan | gog | auto,
projectName?: string, // 项目名称
mode?: sync | async, // 同步/异步
timeout?: number // 超时时间(秒)
})

// 返回: {
// taskId: string,
// status: SUCCESS | PENDING,
// outputs: [{
// originalUrl: string, // RH 服务器 URL
// cloudUrl?: string // 网盘 URL(cloud 模式)
// }]
// }

rhquerytask

查询任务状态(用于异步模式)。

javascript
rhquerytask({ taskId: string })
// 返回: { taskId, status, outputs?, progress? }

使用示例

简单生图(none 模式)

用户: 生成一只可爱的猫咪

Agent 调用:
rh_execute({
alias: qwen-text-to-image,
params: { text: 一只可爱的猫咪,卡通风格 },
storage: none
})
// 返回 RH 服务器 URL

上传到百度网盘

用户: 生成一张风景图保存到网盘

Agent 调用:
rh_execute({
alias: qwen-text-to-image,
params: { text: 美丽的风景 },
storage: cloud,
cloudProvider: bdpan,
projectName: landscape
})
// 返回 bdpan://runninghub/landscape/...

链式流程(图生视频)

用户: 生成主角图片,然后用它生成视频

步骤1: 生成图片(storage: none)
const imageResult = await rh_execute({
alias: qwen-text-to-image,
params: { text: 主角形象 },
storage: none
});
const imageUrl = imageResult.outputs[0].originalUrl;

步骤2: 图生视频(使用上一步 URL)
rh_execute({
alias: image-to-video,
params: { image: imageUrl, prompt: 奔跑动画 },
storage: cloud
});

共享 APP 清单

内置共享测试 APP(来自 RHMCP 官方):

别名APP ID类型说明
qwen-text-to-image2037760725296357377imageQwen 文生图
qwen-image-to-image
2037822548796252162 | image | Qwen 图生图 |

故障排除

问题原因解决
提交任务失败APP 参数不匹配检查 shared-apps.json 中的 inputs 配置
bdpan 上传失败
未登录 | 执行 bash scripts/login.sh 重新登录 | | 任务超时 | 执行时间过长 | 使用 mode: async 异步模式 | | Token 过期 | 授权失效 | 重新登录或授权 |

扩展开发

添加新 APP

编辑 references/shared-apps.json:

json
{
apps: {
my-new-app: {
appId: your-app-id,
alias: my-new-app,
category: video,
description: 描述,
inputs: {
param1: { nodeId: 1, fieldName: field1 }
}
}
}
}

参考链接

  • - RHMCP GitHub: https://github.com/AIRix315/RHMCP
  • RunningHub: https://www.runninghub.cn
  • OpenClaw 文档: https://docs.openclaw.ai

许可证

MIT

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 rhskill-1775943844 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 rhskill-1775943844 技能

通过命令行安装

skillhub install rhskill-1775943844

下载

⬇ 下载 runninghub_api v1.0.0(免费)

文件大小: 13.49 KB | 发布时间: 2026-4-12 11:15

v1.0.0 最新 2026-4-12 11:15
- Initial release of the RunningHub API skill for direct access to AI tasks like image, video, and audio generation.
- Supports advanced storage modes: auto, cloud (Baidu Netdisk/Google Drive), and none, with smart decision logic.
- Offers APIs for listing available RunningHub apps, executing tasks (sync/async), and querying task status.
- Includes detailed setup guides for required environment variables and optional cloud storage integration.
- Provides workflow examples for image and video generation, including step-by-step chainable processes.
- Includes troubleshooting, app extension instructions, and integration notes with OpenClaw and RHMCP.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部