nodeInfoList)workflowId) who want to run AI workflows without opening the web page.| File Name | Function |
|---|---|
| workflow.py | Main execution script |
| api.json | Workflow configuration downloaded from RunningHub (contains node definitions) |
| Function Name | Description |
|---|---|
| load_json(file_path) | Load and parse workflow JSON from local file |
| convert_to_node_info_list(data) | Convert JSON format to a list of node information |
| upload_file(API_KEY, file_path) | Upload local file (image/audio/video) to RunningHub |
| submit_task(workflowId, node_info_list, API_KEY) | Submit task to start AI workflow execution |
| query_task_outputs(task_id, API_KEY) | Poll task status and get result outputs |
Please enter your api_key:0s2d1***********2n3mk4Please enter workflowId:1980468315921559554Enter your JSON file address (the JSON file must be obtained in your own workbench by exporting the workflow API to your local computer):C:\Users\Mayn\Downloads\api.jsonWaiting for node_info_list generation (contains all modifiable nodes)
{'3': {'inputs': {...}}, '4': {...}, '6': {...}, ...}Please enter nodeId (enter 'exit' to finish modifying):🧩 Found node 10 fields:
(0, {'nodeId': '10', 'fieldName': 'image', 'fieldValue': 'xxx.jpg'})Please enter the fieldName to modify:imagePlease enter your local image file path:D:\R.jpgUploading file, please wait
Upload result: {'code': 0, 'msg': 'success', 'data': {'fileName': 'api/xxx.jpg', 'fileType': 'input'}}
✅ Updated image fieldValue: api/xxx.jpgPlease enter new fieldValue (text):1 girl in classroom✅ Updated fieldValue: 1 girl in classroomYou can modify multiple nodes; enter exitto finish.
Submitting task, please wait
📌 Task submission result: {'code': 0, 'msg': 'success', 'data': {...}}
📝 taskId: 1980471280073846785
✅ No node errors, task submitted successfully.⏳ Task running...
⏳ Task running...
🎉 Generation complete!❌ Task failed!
Node SaveImage error: 'str' object has no attribute 'shape'
Traceback: [...]🎉 Generation complete!
[{'fileUrl': 'https://rh-images.xiaoyaoyou.com/f24a6365b08fa3bc02f55cd1f63e74a7/output/ComfyUI_00001_hnqxe_1761016156.png',
'fileType': 'png',
'taskCostTime': '35',
'nodeId': '17'}]
✅ Task complete!fileUrl to view AI-generated images.Please enter your api_key: a0fada**************b2ke21
Please enter workflowId: ***8315921559***
Enter your JSON file address (the JSON file must be obtained in your own workbench by exporting the workflow API to your local computer): C:\Users\Mayn\Downloads\api.json🧩 Found node 10 fields:
(0, {'nodeId': '10', 'fieldName': 'image', 'fieldValue': 'xxx.jpg'})
✅ Updated image fieldValue: api/xxx.jpgSubmitting task, please wait
📌 Task submission result: {...}
⏳ Task running...
🎉 Generation complete!
✅ Task complete!\ in file pathswww.runninghub.cn