connect_nodes
Connect two nodes in a workflow. The sourceSocketId MUST be an output of the source node, and the targetSocketId MUST be an input of the target node. Use the exact socket IDs returned by add_node.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | ||
| workspaceId | Yes | The workspace ID | |
| sourceNodeId | Yes | The node to connect FROM | |
| targetNodeId | Yes | The node to connect TO | |
| sourceSocketId | Yes | The OUTPUT socket ID on the source node (e.g., "out_img", "val", "result") | |
| targetSocketId | Yes | The INPUT socket ID on the target node (e.g., "prompt", "in_img", "media") |