1. ComfyUI Workflows
runninghub-api
  • Log of Update
  • AI App
    • Start AI App Task
      POST
    • Get API call examples for AI application
      GET
  • ComfyUI Workflows
    • Start ComfyUI Task 1 - Basic
      POST
    • Start ComfyUI Task 2 - Advanced
      POST
    • Get Workflow JSON
      POST
    • Cancel ComfyUI Task
      POST
  • Getting Started
    • Instructions for Use
    • About nodeInfoList
    • About Enterprise ComfyUI API
    • Native ComfyUI API Integration Guide
    • API Error Code Reference
  • Integration Example
    • Complete integration example
    • Complete Integration Example – Advanced Edition
    • Task Progress Display Example
    • Full Workflow Integration Example
  • Task Query & webhook
    • Check Task Status
      POST
    • Check Task Output
      POST
    • Get Webhook Event Details
      POST
    • Resend Specific Webhook Event
      POST
  • Standard-API
    • Image Generation (New)
      • Nano Banana
        • nano-banana-pro/text-to-image
        • nano-banana-pro/text-to-image
        • nano-banana-pro-official/edit
        • nano-banana/text-to-image
        • nano-banana-pro/edit
        • nano-banana/edit
      • gpt-image
        • gpt-image/text-to-image
        • gpt-image/edit
      • seedream
        • seedream-v4.5-文生图
        • seedream-v4-文生图
        • seedream-v4.5-图生图
        • seedream-v4-图生图
    • Video Generation (New)
      • Sora
        • sora-2/text-to-video-pro
        • sora-2/image-to-video-pro
        • sora-2/image-to-video
        • sora-2-official/image-to-video-realistic
        • sora2-text-to-video
        • sora-2-official/text-to-video
        • sora-2-official/image-to-video
        • sora-2-official/text-to-video-pro
        • sora-2-official/image-to-video-pro
        • sora2/upload-character
      • Veo
        • veo-3.1-fast/image-to-video
        • veo-3.1-fast/text-to-video
        • veo-3.1-pro/text-to-video
      • Kling 2.6 Models
        • kling-v2.6-pro/text-to-video
        • kling-v2.6-pro/image-to-video
      • Wan 2.6 Models
        • alibaba/wan-2.6/text-to-video
        • alibaba/wan-2.6/image-to-video
        • alibaba/wan-2.6/image-to-video
      • Kling 2.5 Models
        • kling-v2.5-turbo-pro/text-to-video
        • kling-v2.5-turbo-pro/image-to-video
        • kling-v2.5-turbo-std/image-to-video
      • Kling O1 Models
        • kling-video-o1/text-to-video
        • kling-video-o1/image-to-video
        • kling-video-o1/start-to-end
        • kling-video-o1-std/refrence-to-video
        • kling-video-o1-std/edit-video
      • Minmax Hailuo Models
        • hailuo-02/t2v-standard
        • hailuo-02/t2v-pro
        • hailuo-02/i2v-standard
        • hailuo-02/standard
        • hailuo-02/pro
        • hailuo-02/fast
        • hailuo-02/i2v-pro
        • hailuo-2.3/i2v-standard
        • hailuo-2.3-fast/image-to-video
        • hailuo-2.3-fast-pro/image-to-video
        • hailuo-2.3/image-to-video-pro
        • hailuo-2.3/t2v-standard
        • hailuo-2.3/t2v-pro
      • Vidu
        • vidu/text-to-video
        • vidu/image-to-video-q2-pro
        • vidu/image-to-video-q2-turbo
    • Query generation result (V2)
      POST
  • Resource Upload
    • 文件上传(新)
    • Upload Resource(image\video\audio\Compressed Files)
    • Upload Lora
  • Get Account Information
    POST
  • Schemas
    • Get Workflow JSON Request
    • TaskRunWebappByKeyRequest
    • Generate task submission results
    • Get Workflow JSON Response
    • Start ComfyUI Task Request 1
    • Start ComfyUI Task Request 2
    • Start ComfyUI Task Request -webhook
    • Start ComfyUI Task Response
    • TaskCreateResponse
    • Check Task Status Request
    • Node Input Information
    • Get Account Information Request
    • Upload Resource Request
    • Get Webhook Event Details Request
    • Resend Specific Webhook Request
    • R?
    • RWorkflowDuplicateResponse
    • RAccountStatusResponse
    • WorkflowDuplicateResponse
    • AccountStatusResponse
    • WorkflowDuplicateRequest
    • ApiUploadLoraRequest
    • RString
    • RTaskUploadResponse
    • TaskUploadResponse
  1. ComfyUI Workflows

Start ComfyUI Task 2 - Advanced

POST
/task/openapi/create

Start ComfyUI Task (Advanced)#

This API allows you to launch a ComfyUI image generation task based on an existing workflow template, with customized node parameters.
It is suitable for advanced use cases, such as modifying samplers, steps, prompts, seeds, or any other configurable fields in the workflow.
By specifying nodeInfoList, you can dynamically override node parameters, making your task highly flexible and programmable.

Endpoint#

POST https://www.runninghub.ai/task/openapi/create

Method#

POST with application/json body

Request Headers#

HeaderRequiredExampleDescription
HostYeswww.runninghub.aiYour API domain (must be exact)
Content-TypeYesapplication/jsonRequest content type

Request Parameters#

Required Parameters#

NameTypeRequiredDescription
apiKeystringYesYour API key used for authentication
workflowIdstringYesWorkflow template ID, exportable from the UI
nodeInfoListarrayNoList of node parameters to override before task execution

nodeInfoList Structure#

FieldTypeDescription
nodeIdstringUnique ID of the node, from the exported workflow JSON
fieldNamestringField name to override (e.g., text, seed, steps)
fieldValueanyNew value for the field, should match the expected type

Example Request#

{
  "apiKey": "your-api-key",
  "workflowId": "1904136902449209346",
  "retainSeconds": 60,
  "nodeInfoList": [
    {
      "nodeId": "6",
      "fieldName": "text",
      "fieldValue": "1 girl in classroom"
    }
  ]
}

Optional Parameters#

NameTypeDefaultDescription
addMetadatabooleantrueWhether to embed prompt metadata in the image
webhookUrlstring-Optional callback URL to receive result notifications
workflowstring-Custom full workflow JSON string (overrides workflowId)
instanceTypestring-Specify the instance type (e.g., plus)
usePersonalQueuebooleanfalseWhether exclusive-type tasks should enter a queue
retainSecondsInteger-Instance retention time (10~180s). See details below

retainSeconds Usage Instructions#

Only valid for Enterprise Shared API Keys. When set, the instance will remain active for the specified duration after a task successfully completes. It will be prioritized for reuse by the same user with the same workflow, reducing cold start and queuing times.
Cost: Additional fees apply based on the actual duration the instance is retained.
Range: 10 to 180 seconds.
"retainSeconds": 60

Explanation of usePersonalQueue#

This parameter only takes effect for API keys of the exclusive type. If enabled, tasks automatically enter a queue and execute when an exclusive machine assigned to the user becomes available. Limit: 1000 tasks per user.

instanceType Usage Instructions#

To run a task on a "plus" instance (e.g., machines with 48GB VRAM), set the instanceType parameter:
"instanceType": "plus"

About webhookUrl (Advanced Use)#

Set webhookUrl to receive automatic notifications. RunningHub will POST the following to your URL upon completion:
{
  "event": "TASK_END",
  "taskId": "1904163390028185602",
  "eventData": "{\"code\":0,\"msg\":\"success\",\"data\":[{\"fileUrl\":\"...\",\"fileType\":\"png\",\"nodeId\":\"9\"}]}"
}

Response#

Successful Response#

{
  "code": 0,
  "msg": "success",
  "data": {
    "taskId": "1910246754753896450",
    "taskStatus": "QUEUED",
    "clientId": "e825290b08ca2015b8f62f0bbdb5f5f6"
  }
}

Response Fields#

FieldTypeDescription
codeintResponse code, 0 means success
msgstringResponse message
dataobjectTask result data

data Subfields#

FieldTypeDescription
taskIdstringUnique ID for querying status or result
taskStatusstringInitial status: QUEUED, RUNNING, or FAILED
promptTipsstringComfyUI validation messages or errors

Best Practices#

✅ Always verify nodeId and fieldName against your exported workflow JSON.
✅ Use retainSeconds for high-frequency tasks to significantly improve response speed.
✅ Implement webhookUrl for efficient, asynchronous result handling.
❌ Avoid polling at extremely high frequencies; use webhooks where possible.

Related APIs#

Check Task Status
Check Task Output
Upload Resource

Request

Authorization
Header Params

Body Params application/json

Example
{
    "apiKey": "{{apiKey}}",
    "workflowId": "1904136902449209346",
    "nodeInfoList": [
        {
            "nodeId": "6",
            "fieldName": "text",
            "fieldValue": "1 girl in classroom"
        }
    ],
    "workflow": "{\"3\":{\"class_type\":\"KSampler\",\"inputs\":{\"scheduler\":\"karras\",\"negative\":[\"7\",0],\"denoise\":1,\"latent_image\":[\"5\",0],\"seed\":669816362794144,\"cfg\":8,\"sampler_name\":\"dpmpp_2m\",\"model\":[\"4\",0],\"positive\":[\"6\",0],\"steps\":20},\"_meta\":{\"title\":\"KSampler\"}},\"4\":{\"class_type\":\"CheckpointLoaderSimple\",\"inputs\":{\"ckpt_name\":\"MR 3DQ _SDXL V0.2.safetensors\"},\"_meta\":{\"title\":\"Load Checkpoint\"}},\"37\":{\"class_type\":\"VAEDecode\",\"inputs\":{\"vae\":[\"4\",2],\"samples\":[\"3\",0]},\"_meta\":{\"title\":\"VAE Decode\"}},\"5\":{\"class_type\":\"EmptyLatentImage\",\"inputs\":{\"batch_size\":1,\"width\":512,\"height\":512},\"_meta\":{\"title\":\"Empty Latent Image\"}},\"6\":{\"class_type\":\"CLIPTextEncode\",\"inputs\":{\"speak_and_recognation\":{\"__value__\":[false,true]},\"text\":\"DreamWork 3D Style, a cute panda holding a bamboo in hands at sunset, highly detailed, ultra-high resolutions, 32K UHD, best quality, masterpiece, \",\"clip\":[\"4\",1]},\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"7\":{\"class_type\":\"CLIPTextEncode\",\"inputs\":{\"speak_and_recognation\":{\"__value__\":[false,true]},\"text\":\"\",\"clip\":[\"4\",1]},\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"9\":{\"class_type\":\"SaveImage\",\"inputs\":{\"filename_prefix\":\"ComfyUI\",\"images\":[\"37\",0]},\"_meta\":{\"title\":\"Save Image\"}}}",
    "addMetadata": true
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://www.runninghub.ai/task/openapi/create' \
--header 'Host: www.runninghub.ai' \
--header 'Authorization: Bearer [Your API KEY]' \
--header 'Content-Type: application/json' \
--data '{
    "apiKey": "Please enter your own apiKey and keep it safe.",
    "workflowId": "1904136902449209346",
    "nodeInfoList": [
        {
            "nodeId": "6",
            "fieldName": "text",
            "fieldValue": "1 girl in classroom"
        }
    ],
    "workflow": "{\"3\":{\"class_type\":\"KSampler\",\"inputs\":{\"scheduler\":\"karras\",\"negative\":[\"7\",0],\"denoise\":1,\"latent_image\":[\"5\",0],\"seed\":669816362794144,\"cfg\":8,\"sampler_name\":\"dpmpp_2m\",\"model\":[\"4\",0],\"positive\":[\"6\",0],\"steps\":20},\"_meta\":{\"title\":\"KSampler\"}},\"4\":{\"class_type\":\"CheckpointLoaderSimple\",\"inputs\":{\"ckpt_name\":\"MR 3DQ _SDXL V0.2.safetensors\"},\"_meta\":{\"title\":\"Load Checkpoint\"}},\"37\":{\"class_type\":\"VAEDecode\",\"inputs\":{\"vae\":[\"4\",2],\"samples\":[\"3\",0]},\"_meta\":{\"title\":\"VAE Decode\"}},\"5\":{\"class_type\":\"EmptyLatentImage\",\"inputs\":{\"batch_size\":1,\"width\":512,\"height\":512},\"_meta\":{\"title\":\"Empty Latent Image\"}},\"6\":{\"class_type\":\"CLIPTextEncode\",\"inputs\":{\"speak_and_recognation\":{\"__value__\":[false,true]},\"text\":\"DreamWork 3D Style, a cute panda holding a bamboo in hands at sunset, highly detailed, ultra-high resolutions, 32K UHD, best quality, masterpiece, \",\"clip\":[\"4\",1]},\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"7\":{\"class_type\":\"CLIPTextEncode\",\"inputs\":{\"speak_and_recognation\":{\"__value__\":[false,true]},\"text\":\"\",\"clip\":[\"4\",1]},\"_meta\":{\"title\":\"CLIP Text Encode (Prompt)\"}},\"9\":{\"class_type\":\"SaveImage\",\"inputs\":{\"filename_prefix\":\"ComfyUI\",\"images\":[\"37\",0]},\"_meta\":{\"title\":\"Save Image\"}}}",
    "addMetadata": true
}'

Responses

🟢200成功
application/json
Bodyapplication/json

Example
{
  "code": 0,
  "msg": "",
  "data": {
    "taskId": 0,
    "clientId": "",
    "taskStatus": "",
    "promptTips": ""
  }
}
Modified at 2026-04-08 02:32:39
Previous
Start ComfyUI Task 1 - Basic
Next
Get Workflow JSON
Built with