Introduction

Welcome to the RunningHub API, designed to facilitate the easy use of ComfyUI functionalities hosted on the RunningHub cloud.

Through this API, you can run various complex workflows in bulk and initiate tasks consecutively. As long as a workflow can run properly on the RunningHub platform, you can seamlessly integrate it into your product or flexibly apply it in any scenario requiring AI workflows.

Getting Started

Before using the RunningHub API, please ensure the following preparations are complete:

  1. First, register as a user on the RunningHub website and activate the membership privileges. Currently, free users cannot access the RunningHub API.

  2. Open a workflow and note the workflow ID in the address bar, as our API calls are based on this workflow ID.

  3. For example, in the following URL(Sample workflow), the workflow ID is 1851826914200891393.

    image.png

  4. Make sure to run this flow manually and have it work properly, or you'll get an error when using the API.

1. Obtaining the API Key

RunningHub automatically generates a unique 32-character API Key for each user, serving as the sole identifier for your account.

image.png

To view your API Key, open the homepage at RunningHUB, log in to your account, and open the floating profile menu at the top right corner of the page. Keep your API Key secure and do not disclose it, as it will be needed in subsequent steps.

API Keys are divided into Enterprise and Consumer tiers (both use the same API integration method):

· Enterprise API KEY: To use the Shared API, you must first top up your account. API calls will deduct balance based on actual runtime. For detailed pricing, please refer to the website. Dedicated API access requires contacting our business team for activation.

· Consumer API KEY: Only users with a Personal membership or higher can call APIs using an API Key. Consumer API usage will consume RH Coins from your account at the same rate as running workflows on the website.

image.png

2. Simple Workflow Execution

This method of running a workflow is equivalent to pressing the "Run" button without altering any of the original parameters.

It is suitable for tasks like drawing random selections.

EndpointPOST /task/openapi/create

Header Value Notes
Content-Type application/json
Parameter Type Required Notes
workflowId string Yes
apiKey string Yes
Parameter Type Notes
msg string Normally: "success"
data: taskId string Unique task ID for this run, corresponding to task IDs in the website’s workspace lists
data:clientId string Client ID for this run, mainly for troubleshooting (usually can be ignored)
data:promptTips string Error details if any error occurs
data:taskStatus string Status options: QUEUED (In Queue), RUNNING (Running), SUCCESS (Run Complete and Successful), FAILED (Run Complete and Failed)

This workflow execution method is equivalent to pressing the "Run" button without modifying any original parameters. If you'd rather skip the detailed interface description, you can simply copy the following code, replacing workflowId and apiKey with your own values, to get started immediately.