1. Integration Example
RunningHub-API
  • Log of Update
  • Getting Started
    • Instructions for Use
    • About nodeInfoList
    • About Enterprise ComfyUI API
    • Native ComfyUI API Integration Guide
    • API Error Code Reference
  • Quick Create
    • About Quick Create Invocation
    • Obtain quick create - model library style parameter data
      POST
    • Initiate Quick Create Task
      POST
  • Integration Example
    • Complete integration example
    • Complete Integration Example – Advanced Edition
    • Task Progress Display Example
    • Full Workflow Integration Example
  • Standard Model API
    • Video Generation & Processing
      • image-to-video
        • Vidu
          • Vidu-image-to-video-q3-pro-fast
          • Vidu-start-end-to-video-q3-pro-fast
          • Vidu-start-end-to-video-q2-turbo
          • Vidu-start-end-to-video-q2-pro
          • Vidu-image-to-video-q2-pro
          • Vidu-image-to-video-q2-turbo
          • Vidu-image-to-video-q3-pro
          • Vidu-image-to-video-q2-pro-fast
          • Vidu-start-end-to-video-q2-pro-fast
          • Vidu-image-to-video-q3-turbo
          • Vidu-start-end-to-video-q3-turbo
          • Vidu-start-end-to-video-q3-pro
        • kling
          • kling-v3.0-pro-image-to-video
          • kling-video-o3-pro/reference-to-video
          • kling-video-o1/image-to-video
          • kling-v3.0-std-image-to-video
          • kling-video-o3-std/reference-to-video
          • kling-video-o1/start-to-end
          • kling-video-o3-pro-image-to-video
          • kling-video-o3-std-image-to-video
          • kling-elements
          • kling-v2.5-turbo-std/image-to-video
          • kling-v2.5-turbo-pro/image-to-video
          • kling-v2.6-pro-image-to-video
        • wan
          • wan-2.7/image-to-video
          • wan-2.2/image-to-video
          • wan-2.6-reference-to-video
          • wan-2.6-reference-to-video-flash
          • wan-2.6-image-to-video-flash
          • wan-2.2-video/start-to-end
        • alibaba
          • wan
            • alibaba/wan-2.6/image-to-video
        • seedance
          • seedance-2.0/image-to-video
          • seedance-2.0-fast/image-to-video
          • seedance-v1.5-pro-image-to-video-fast
          • seedance-v1.5-pro-image-to-video
        • hailuo
          • hailuo-02-i2v-standard
          • hailuo-02-standard
          • hailuo-2.3/i2v-standard
          • hailuo-2.3-fast/image-to-video
          • hailuo-2.3-fast-pro/image-to-video
          • hailuo-2.3/i2v-pro
          • hailuo-02-i2v-pro
          • hailuo-02-fast
        • midjourney
          • midjourney-image-to-video
        • sora
          • sora-2/image-to-video-channel-low-price
          • sora-2/image-to-video-pro-official-stable
          • sora-2/image-to-video-pro-channel-low-price
          • sora-2/text-to-video-pro-official-stable
          • sora-2/image-to-video-realistic-official-stable
          • sora-2/image-to-video-official-stable
          • sora-2/image-to-video-channel-low-price
          • sora-2/image-to-video-pro-channel-low-price
        • xai
          • grok
            • xai/grok-imagine/image-to-video-channel-low-price
            • xai/grok-imagine/image-to-video-official-stable
        • google
          • veo3.1
            • google/veo3.1-pro/start-end-to-video-channel-low-price
            • google/veo3.1-fast/image-to-video-channel-low-price
            • google/veo3.1-fast/image-to-video-official-stable
            • google/veo3.1-pro/image-to-video-official-stable
            • google/veo3.1-fast/start-end-to-video-channel-low-price
            • google/veo3.1-pro/reference-to-video-official-stable
        • skyreels
          • skyreels-v4/image-to-video
        • ltx
          • ltx-2.3/image-to-video
          • ltx-2.3/image-to-video-lora
        • pixverse
          • pixverse-v6/image-to-video
      • reference-to-video
        • wan-2.7-reference-to-video
        • skyreels-v3/reference-to-video
        • Vidu-reference-to-video-q3
        • seedance-2.0/multimodal-video
        • Vidu-reference-to-video-q2
        • seedance-2.0-fast/multimodal-video
        • kling-video-o1-std/refrence-to-video
        • seedance-v1-lite-reference-to-video
        • skyreels-v4/omni-reference
        • Vidu-reference-to-video-q3-mix
      • text-to-video
        • Vidu
          • Vidu-text-to-video-q3-pro-fast
          • Vidu-text-to-video-q2
          • Vidu-text-to-video-q3-pro
          • Vidu-text-to-video-q3-turbo
        • kling
          • kling-video-o3-std-text-to-video
          • kling-video-o1/text-to-video
          • kling-v3.0-pro-text-to-video
          • kling-v3.0-std-text-to-video
          • kling-video-o3-pro-text-to-video
          • kling-v2.5-turbo-pro/text-to-video
          • kling-v2.6-pro-text-to-video
        • alibaba
          • wan
            • alibaba/wan-2.6/text-to-video
        • seedance
          • seedance-2.0/text-to-video
          • seedance-2.0-fast/text-to-video
          • seedance-v1.5-pro-text-to-video-fast
          • seedance-v1.5-pro-text-to-video
        • hailuo
          • hailuo-02-t2v-standard
          • hailuo-02-pro
          • hailuo-2.3-t2v-standard
          • hailuo-2.3-t2v-pro
          • hailuo-02-t2v-pro
        • sora
          • sora-2/text-to-video-channel-low-price
          • sora-2/text-to-video-pro-channel-low-price
          • sora-2/text-to-video-official-stable
          • sora-2/text-to-video-channel-low-price
          • sora-2/text-to-video-pro-channel-low-price
        • xai
          • grok
            • xai/grok-imagine/text-to-video-channel-low-price
            • xai/grok-imagine/text-to-video-official-stable
        • google
          • veo3.1
            • google/veo3.1-pro/text-to-video-channel-low-price
            • google/veo3.1-pro/text-to-video-official-stable
            • google/veo3.1-fast/video-extend-official-stable
            • google/veo3.1-pro/video-extend-official-stable
            • google/veo3.1-fast/text-to-video-channel-low-price
            • google/veo3.1-fast/text-to-video-official-stable
        • cinematic
          • cinematic-video-generator
        • wan
          • wan-2.7/text-to-video
          • wan-2.2/text-to-video
        • skyreels
          • skyreels-v4/text-to-video
        • ltx
          • ltx-2.3/text-to-video
          • ltx-2.3/text-to-video-lora
        • pixverse
          • pixverse-v6/text-to-video
      • video-edit
        • wan-2.7/video-edit
        • kling-video-o3-pro/video-edit
        • kling-video-o3-std/video-edit
        • kling-video-o1-std/edit-video
        • xai/grok-imagine/edit-video-official-stable
      • motion-control
        • kling-v3.0-pro-motion-control
        • kling-v3.0-std-motion-control
        • kling-v2.6-pro-motion-control
        • bytedance/dreamactor-v2
        • kling-v2.6-std-motion-control
      • video-tools
        • sora-upload-character-official
        • pixverse-v6/extend
        • pixverse-v6/transition
        • sora-upload-character-channel-low-price
        • rh-video-upscaler
        • rh-video-fps-increaser
      • video-effects
        • skyreels-v3/video-restyling
      • video-extend
        • wan-2.7/video-extend
        • skyreels-v3/single-shot-video-extension
        • skyreels-v3/shot-switching-video-extension
      • audio-to-video
        • kling-lip-sync/identify-face
        • kling-lip-sync/lip-sync-video
    • 3D Generation & Processing
      • text-to-3D
        • hunyuan3d-v3.1/text-to-3d
      • image-to-3D
        • hitem3d-v15/image-to-3d
        • hunyuan3d-v3.1/image-to-3d
        • hitem3d-v2/image-to-3d
        • hitem3d-v15/multi-image-to-3d
        • hitem3d-v2/multi-image-to-3d
        • hitem3d-portrait-v21/image-to-3d
        • hitem3d-portrait-v21/multi-image-to-3d
        • hitem3d-portrait-v20/image-to-3d
        • hitem3d-portrait-v20/multi-image-to-3d
        • hitem3d-portrait-v15/image-to-3d
        • hitem3d-portrait-v15/multi-image-to-3d
    • Audio Generation & Processing
      • text-to-audio
        • minimax/speech-2.8-hd
        • minimax/music-2.5
        • minimax/speech-02-hd
        • minimax/speech-02-turbo
        • minimax/speech-2.6-hd
        • minimax/speech-2.6-turbo
        • minimax/speech-2.8-turbo
        • minimax/voice-clone
        • kling-lip-sync/tts
    • Image Generation & Processing
      • reference-to-image
        • Vidu-reference-to-video-q2-pro
      • image-to-image
        • midjourney
          • midjourney-text-to-image-niji6
          • midjourney-text-to-image-v61
          • midjourney-text-to-image-v6
          • midjourney-text-to-image-v7
        • seedream
          • seedream-v4.5/image-to-image
          • seedream-v4/image-to-image
          • seedream-v5-lite/image-to-image
        • nano
          • nano-banana2-gemini31flash/image-to-image-channel-low-price
          • nano-banana-pro/edit-channel-low-price
          • nano-banana2-gemini31flash/image-to-image-official-stable
          • nano-banana/edit-channel-low-price
          • nano-banana/edit-official-stable
          • nano-banana-pro/edit-ultra-official-stable
          • nano-banana-pro/edit-official-stable
        • gpt
          • gpt-image-1.5/edit-channel-low-price
        • grok
          • grok-image/image-to-image/channel-low-price
        • qwen
          • qwen-image/edit-2511-lora
          • qwen-image/edit-2511
          • qwen-image-2.0-pro/image-edit
          • qwen-image-2.0/image-edit
        • z
          • z-image-turbo/image-to-image-lora
          • z-image-turbo/image-to-image
        • wan
          • wan-2.2/image-to-image
        • f
          • f-kontext-dev-lora
          • f-2-dev/edit-lora
          • f-2-dev/edit
          • f-2-klein-9b/edit
          • f-2-klein-4b/edit
          • f-2-klein-4b/edit-lora
      • text-to-image
        • midjourney
          • midjourney-text-to-image-niji7
        • nano
          • nano-banana-pro/text-to-image-channel-low-price
          • nano-banana2-gemini31flash/text-to-image-official-stable
          • nano-banana/text-to-image-channel-low-price
          • nano-banana-pro/text-to-image-ultra-official-stable
          • nano-banana2-gemini31flash/text-to-image-channel-low-price
          • nano-banana-pro/text-to-image-official-stable
          • nano-banana/text-to-image-official-stable
        • gpt
          • gpt-image-1.5/text-to-image-official-stable
          • gpt-image-1.5/text-to-image-channel-low-price
          • gpt-image-1.5/image-to-image-official-stable
        • seedream
          • seedream-v4.5/text-to-image
          • seedream-v5-lite/text-to-image
          • seedream-v4/text-to-image
        • grok
          • grok-image/text-to-image/channel-low-price
        • qwen
          • qwen-image/text-to-image-2512
          • qwen-image/text-to-image-2512-lora
          • qwen-image-2.0/text-to-image
          • qwen-image-2.0-pro/text-to-image
        • z
          • z-image/turbo-lora
          • z-image/turbo
        • wan
          • wan-2.2/text-to-image-lora
          • wan-2.7/text-to-image-pro
          • wan-2.7/text-to-image
        • f
          • f-krea-dev-lora
          • f-dev-lora
          • f-2-dev/text-to-image-lora
          • f-2-dev/text-to-image
          • f-2-klein-9b/text-to-image-lora
          • f-2-klein-9b/text-to-image
          • f-2-klein-4b/text-to-image
          • f-2-klein-4b/text-to-image-lora
          • f-dev
      • image-tools
        • wan-2.7/image-edit-pro
        • wan-2.7/image-edit
    • Other
      • pixverse-v5.6/text-to-video
      • pixverse-v5.6/image-to-video
  • Task Query & webhook
    • Check Task Status
      POST
    • Check Task Output
      POST
    • Get Webhook Event Details
      POST
    • Resend Specific Webhook Event
      POST
    • Query generation result (V2)
      POST
  • ComfyUI Workflows
    • Start ComfyUI Task 1 - Basic
      POST
    • Start ComfyUI Task 2 - Advanced
      POST
    • Get Workflow JSON
      POST
    • Cancel ComfyUI Task
      POST
  • AI App
    • Start AI App Task
    • Get API call examples for AI application
  • 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. Integration Example

Complete integration example

📝 RunningHub AI Application Python Interactive Script User Manual#

1. Script Function Overview#

This Python script allows you to:
Retrieve editable node information (nodeInfoList) of a specified AI application (WebApp).
Modify node values according to their type (image, text, etc.).
Upload local files to the AI application.
Submit the modified task to the AI application.
Automatically poll the task status until the result is generated.
Output the generated result file link.
In short: You can use this script to send local files or text to RunningHub AI applications for generation or processing, and automatically retrieve the results.

2. Code Introduction#

def get_nodo(webappId, Api_Key)#

Retrieves the node list (nodeInfoList) of the AI application. Refer to RunningHub official API documentation for “Get AI Application Information Example”.

def upload_file(API_KEY, file_path)#

Uploads a local file to the RunningHub server (image). Refer to official API documentation for “Upload Resource Example”.

def submit_task(webapp_id, node_info_list, API_KEY)#

Submits an AI application task. Refer to official API documentation for “Submit Task Example”.

def query_task_outputs(task_id, API_KEY)#

Queries task status (the /task/openapi/status endpoint is no longer maintained) and retrieves the generated result. Refer to official API documentation for “Query Task Output Example”.

main function#

Allows users to interact with the script in the console, completing the full process:
Retrieve node list → Modify node info → Submit task → Poll task status → Retrieve task result.

3. User Console Operation Steps (Detailed)#

Step 1: Input API Information#

The script first prompts you to enter the API Key and WebApp ID to retrieve the AI application’s node information.
Please enter your api_key:
Example: a0fa3e****************345171
Please enter webappId:
Example: 1937084629516193794
Note: The WebApp link is https://www.runninghub.cn/ai-detail/1937084629516193794. The number at the end is the webappId.
The script retrieves nodeInfoList, which contains all editable nodes:
[
  {
    "nodeId": "39",
    "nodeName": "LoadImage",
    "fieldName": "image",
    "fieldValue": "a293d89506f9c484f4ea5695f93024a80cd62ef98f4ee4543faba357536b37ec.jpg",
    "fieldType": "IMAGE",
    "description": "Upload Image"
  },
  {
    "nodeId": "37",
    "nodeName": "RH_ComfyFluxKontext",
    "fieldName": "model",
    "fieldValue": "flux-kontext-pro",
    "fieldType": "LIST",
    "description": "Model Selection"
  },
  {
    "nodeId": "37",
    "nodeName": "RH_ComfyFluxKontext",
    "fieldName": "aspect_ratio",
    "fieldValue": "match_input_image",
    "fieldType": "LIST",
    "description": "Output Ratio"
  },
  {
    "nodeId": "52",
    "nodeName": "RH_Translator",
    "fieldName": "prompt",
    "fieldValue": "Change this woman's hairstyle to short bob,",
    "fieldType": "STRING",
    "description": "Image Editing Text Input"
  }
]

Step 2: Select Node to Modify#

After generating nodeInfoList, the script prompts you to input the node ID and field name for modification.
Please enter nodeId (type 'exit' to finish modifications):
Example input: 39
Please enter fieldName:
Example input: image
The script displays the selected node information:
Selected node: {'nodeId': '39', 'nodeName': 'LoadImage', 'fieldName': 'image', 'fieldValue': 'a293d8...', 'fieldType': 'IMAGE', 'description': 'Upload Image'}

Step 3: Modify Node Value#

3.1 IMAGE Type#

Prompt:
Please enter your local IMAGE file path:
Example input: D:\R.jpg
After successful upload, the script returns the file information and automatically updates the node value:
Uploading file...
Upload result: {'code': 0, 'msg': 'success', 'data': {'fileName': 'api/xxxx.jpg', 'fileType': 'image'}}
✅ IMAGE fieldValue updated: api/xxxx.jpg

3.2 STRING Type#

Prompt:
Please enter new fieldValue (STRING):
Example input: Change this man's hairstyle to short bob
Return:
✅ fieldValue updated: Change this man's hairstyle to short bob

3.3 LIST Type#

Prompt:
Please enter new fieldValue (LIST):
Example: Select one value from the list in fieldData to update fieldValue.
Return:
✅ fieldValue updated: 1:1
You can loop to modify multiple nodes until you type exit.

Step 4: Submit Task#

After modifying nodes, the script automatically submits the task:
Submitting task, please wait...
📌 Submit task response: {'code': 0, 'msg': 'success', 'data': {'taskId': '1979110509284917250', ... ,'promptTips': '{"result": true, "error": null, "outputs_to_execute": ["36"], "node_errors": {}}'}}}
If node_errors in promptTips is not empty, it indicates a node error.
⚠️ Node error information:
node_errors{}
📝 taskId: 1979110509284917250
Note: taskId is used to query task status and retrieve results.
Note:If node_errors in promptTips is not empty, it indicates that there are errors in some nodes.

Step 5: Poll Task Status#

The script automatically polls every 5 seconds:
⏳ Task in queue...
⏳ Task running...
🎉 Generation completed!
✅ Task completed!
SUCCESS → Task completed
failedReason → Task failed
Other statuses → Waiting

Step 6: Retrieve Generated Result#

After the task completes, the script outputs the result link:
🎉 Generation completed!
https://rh-images.xiaoyaoyou.com/f24a6365b08fa3bc02f55cd1f63e74a7/output/ComfyUI_00001_vpvtp_1760691733.png
Open the link directly to view the generated file.

⚡ Tips#

File path format:
Windows: D:\path\to\file.jpg
Network issues:
Upload or task submission may fail due to slow network; retry if needed.
Modify multiple nodes at once:
Loop input nodeId + fieldName + new value, type exit to finish.
File type handling:
IMAGE → Auto upload file
STRING → Enter text directly
LIST → Select one index value from fieldData to update fieldValue

4. Usage Flow Summary#

1.
Input api_key and webappId
2.
Retrieve nodeInfoList
3.
Loop modify nodes
4.
Submit task
5.
Auto poll status
6.
Retrieve generated file link
Fully automate RunningHub AI application operations via Python script, without manually operating on the web — ideal for batch tasks.

5. Complete Python Automation Script Example#

Modified at 2026-03-10 12:15:41
Previous
Initiate Quick Create Task
Next
Complete Integration Example – Advanced Edition
Built with