RunningHub Cloud Execution¶
Use RunningHub cloud platform to execute workflows without local GPU or ComfyUI installation.
Get API Key¶
- Visit RunningHub
- Sign up for a free account
- Get your API key from the dashboard
Basic Usage¶
from comfykit import ComfyKit
# Initialize with RunningHub API key
kit = ComfyKit(
runninghub_api_key="rh-key-xxx"
)
# Execute with workflow ID
result = await kit.execute("12345", {
"prompt": "a beautiful landscape"
})
Configuration¶
kit = ComfyKit(
# RunningHub API URL (optional)
runninghub_url="https://www.runninghub.ai", # Default
# API Key (required)
runninghub_api_key="rh-key-xxx",
# Timeout in seconds (optional)
runninghub_timeout=300, # Default: 5 minutes
# Retry count (optional)
runninghub_retry_count=3 # Default: 3 retries
)
Environment Variables¶
export RUNNINGHUB_BASE_URL="https://www.runninghub.ai"
export RUNNINGHUB_API_KEY="rh-key-xxx"
export RUNNINGHUB_TIMEOUT="300"
export RUNNINGHUB_RETRY_COUNT="3"
Complete Example¶
import asyncio
from comfykit import ComfyKit
async def main():
# Initialize with RunningHub
kit = ComfyKit(
runninghub_api_key="rh-key-xxx"
)
# Execute workflow
result = await kit.execute("12345", {
"prompt": "a cute cat playing with yarn",
"width": 1024,
"height": 768,
"steps": 30
})
if result.status == "completed":
print(f"β
Success! Duration: {result.duration:.2f}s")
print(f"πΌοΈ Images: {result.images}")
else:
print(f"β Failed: {result.msg}")
asyncio.run(main())
Workflow IDs¶
RunningHub workflows are identified by numeric IDs. You can find workflow IDs in:
- RunningHub workflow gallery
- Your personal workflow list
- Shared workflow links
Advantages¶
- βοΈ No GPU Required: Run on cloud infrastructure
- π Fast: Optimized GPU instances
- π¦ Pre-configured: All models and dependencies ready
- π° Cost-effective: Pay only for what you use
Next Steps¶
- Learn about Result Processing
- Explore complete Examples