About nodeInfoList
What is nodeId
, fieldName
?
In the workflow interface, each node has a number at the top-right corner — that is the nodeId.
Before calling the API to start a ComfyUI task, familiarize yourself with the api_format
file of the workflow.
- Click the download icon at the top of the RunningHub interface.
- Select Export Workflow API.
- After downloading, open the file — it is a standard JSON file.
Each nodeId
corresponds to an inputs
section. The keys within inputs
are the fieldNames.
When you modify a node’s value in the workflow, you are essentially changing the fieldValue for a given fieldName.
For example, to change the text in a text-to-image example and the random seed in KSampler, you would look for nodes with nodeId
"6"
and "3"
in the workflow file, then search for those numbers in the JSON.
- The fieldName for the text is
"text"
. - The fieldName for the random seed is
"seed"
.
Construct the nodeInfoList as follows:
"nodeInfoList": [
{
"nodeId": "6",
"fieldName": "text",
"fieldValue": "1 girl in classroom"
},
{
"nodeId": "3",
"fieldName": "seed",
"fieldValue": "1231231"
}
]
Regarding uploading images for image-to-image workflows
There are two approaches to providing an image for the workflow:
-
Maintain your own image hosting service and use the
LoadImageFromUrl
node.
When the workflow reaches this node, it will download the image from the specified URL.Construct the nodeInfoList as follows:
"nodeInfoList": [ { "nodeId": "13", "fieldName": "image", "fieldValue": "https://rh-images.xiaoyaoyou.com/de0db6f2564c8697b07df55a77f07be9/output/ComfyUI_00038_sffft_1742964027.png?imageMogr2/format/jpeg/ignore-error/1" } ]
-
Use the Upload Resource API.
After calling the resource upload API, pass the returnedfileName
into theLoadImage
node.
For example:{ "code": 0, "msg": "success", "data": { "fileName": "api/9d77b8530f8b3591edc5c4e8f3f55b2cf0960bb2ca35c04e32c1677687866576.png", "fileType": "image" } } "nodeInfoList": [ { "nodeId": "14", "fieldName": "image", "fieldValue": "api/9d77b8530f8b3591edc5c4e8f3f55b2cf0960bb2ca35c04e32c1677687866576.png" } ]
Regarding uploading Lora
Currently, there is only one solution, consisting of three steps:
- Call the API to get the Lora upload URL.
- Use the returned URL to upload the Lora file.
- Use the uploaded Lora in the
RHLoraLoader
node.
Notes
-
API calls do not automatically change the
seed
value.- The same workflow with the same inputs will always produce the same image.
- You must manually generate a random
seed
and include it innodeInfoList
.
-
If a
fieldName
cannot be found in the API-format workflow, that means it’s a purely front-end field that only works in the browser — for example,control_after_generate
inKSampler
. Similarly,group
-related logic is not supported via API. -
In API-format workflows, a
fieldValue
wrapped in[]
typically indicates a connection (wiring) between nodes.- It is not recommended to modify these values.