RunningHub CLI (rh) — Agent Skill
What This Tool Does
rh is a command-line interface for the RunningHub AI platform — a cloud ComfyUI service with 209+ built-in AI model endpoints and support for custom ComfyUI workflow apps.
Use rh to:
- Generate images, videos, audio, and 3D models from text/image prompts
- Browse and run custom ComfyUI AI App workflows
- Check task status and download outputs
- Monitor account balance
Setup
export RH_API_KEY=your_runninghub_api_key
Or pass --api-key KEY to any command.
Get a key at: https://www.runninghub.cn/enterprise-api/sharedApi
Command Reference
Account
rh account status
# → {"remainCoins": "150.0", "currentTaskCounts": "0", "apiType": "coins"}
Built-in Models (rh model)
For quick AI generation using RunningHub's 209 pre-built models.
# List available models
rh model list --type image
rh model list --task text-to-image --top 5
rh model list --type video
# Get parameter schema for an endpoint
rh model info rhart-image-n-pro/text-to-image
# Auto-select best model for a task (recommended for agents)
rh model auto --task text-to-image --prompt "a sunset over mountains" --output out.png
rh model auto --task image-to-video --image input.jpg --output out.mp4
rh model auto --task text-to-speech --prompt "Hello world" --output out.mp3
rh model auto --task text-to-3d --prompt "a ceramic teapot" --output model.glb
# Run a specific endpoint
rh model run rhart-image-n-pro/text-to-image --prompt "anime cat" --output cat.png
rh model run kling-video-o3-pro/image-to-video --image photo.jpg --output video.mp4
Available task types:
text-to-image,image-to-image,image-upscaletext-to-video,image-to-video,reference-to-video,start-end-to-videotext-to-speech,music-generation,voice-clonetext-to-3d,image-to-3d,multi-image-to-3d
Custom AI Apps (rh app)
For custom ComfyUI workflows. Each app has a webappId and modifiable input nodes.
# Browse public apps
rh app list --search "anime portrait" --sort RECOMMEND
rh app list --sort HOTTEST --size 10
# Inspect an app's input schema before running
rh app info 1234567890
# → {"webappId": "...", "name": "...", "nodes": [{"nodeId": "6", "fieldName": "prompt", "fieldType": "STRING", ...}]}
# Run an app
rh app run 1234567890 \
--node "6:prompt=a samurai cat warrior" \
--output result.mp4
# Run with a file input
rh app run 1234567890 \
--node "6:prompt=enhance this portrait" \
--file "10:image=/path/to/photo.jpg" \
--output enhanced.png
# Batch run from CSV
rh app batch 1234567890 --input params.csv --concurrency 3 --output-dir ./results/
Batch CSV format:
6:prompt,10:image
"a ninja dog",/path/to/dog.jpg
"a robot cat",/path/to/cat.jpg
Task Management
# Check status of a task
rh task status abc123
# Get outputs for a completed task
rh task outputs abc123 --output result.png
JSON Output Schema
All commands output JSON. Agents should parse stdout directly.
rh model auto / rh model run success:
{
"taskId": "abc123",
"status": "SUCCESS",
"outputs": [{"fileUrl": "https://cdn.runninghub.cn/...", "fileType": "image/png"}],
"cost": {"duration_s": 8},
"savedTo": "/path/to/out.png",
"selectedEndpoint": "rhart-image-n-pro/text-to-image"
}
rh app run success:
{
"taskId": "xyz789",
"status": "SUCCESS",
"outputs": [{"fileUrl": "https://...", "fileType": "video/mp4"}],
"savedTo": "/path/to/result.mp4"
}
Errors (exit code 1):
{"error": "auth_failed", "message": "Invalid API key or unauthorized"}
{"error": "insufficient_balance", "message": "Account balance is 0"}
{"error": "task_failed", "message": "Task failed: ..."}
{"error": "timeout", "message": "Task exceeded 20 minute timeout"}
Typical Agent Workflows
1. Generate an image
rh model auto --task text-to-image --prompt "a photorealistic sunset over the ocean" --output sunset.png
2. Generate a video from an image
rh model auto --task image-to-video --image portrait.jpg --output animation.mp4
3. Discover and run a custom ComfyUI app
# Step 1: find apps
rh app list --search "anime portrait" --size 5
# Step 2: check the app's inputs
rh app info <webappId>
# Step 3: run it
rh app run <webappId> --node "6:prompt=anime warrior" --file "10:image=photo.jpg" --output result.png
4. Check balance before running
rh account status | python3 -c "import sys,json; d=json.load(sys.stdin); print(d['remainCoins'])"
Error Handling
- All errors produce JSON with an
errorkey and exit code 1 - Progress is written to stderr (polling dots); final JSON is on stdout
- Separate stderr from stdout:
rh model auto ... 2>/dev/null
Notes
- Tasks may take 5 seconds to 20 minutes depending on the model
- Video generation is slower than image generation
- The
--instance plusflag (forrh app run) uses premium compute
Metadata
Release files for runninghub-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| runninghub_cli-0.1.0.tar.gz | 71.1 kB | Without provenance | Details for runninghub_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runninghub_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for runninghub_cli-0.1.0-py3-none-any.whl |
Total release size: 187.0 kB
Release files / runninghub_cli-0.1.0.tar.gz
| Download URL | runninghub_cli-0.1.0.tar.gz |
|---|---|
| Size | 71.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e7d012f1e61fa3a33ede6466d02aef82bb827a3f1778bd0c36070b9d56bce2b
|
|
BLAKE2b-256 checksum How to use checksums |
4434c79c97c404acac36aff2c6e04039796335088805c4fea5cd0afd701fcadf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / runninghub_cli-0.1.0-py3-none-any.whl
| Download URL | runninghub_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 115.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ced0912f8570eeefe3a0a0320a428a713263c6395900a8a9e35483e9dc7b50e
|
|
BLAKE2b-256 checksum How to use checksums |
419748481a751e9df7a1f752394b9e37b6e6856cbfb4a3d6c0a1310e6d049e4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for runninghub-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.