Disconnect
Disconnects from the Leonardo AI API and cleans up the connection session.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
Inputs
- Connection Id (String) - The connection ID from the Connect node to disconnect.
Options
This node does not have options.
Outputs
This node does not have outputs.
How It Works
The Disconnect node terminates the connection to the Leonardo AI API. When executed, the node:
- Receives the connection ID from the Connect node
- Validates that the connection ID is not empty
- Removes the API key session from memory
- Cleans up the connection resources
Requirements
- Valid connection ID from a Connect node
Error Handling
The node will return specific errors in the following cases:
- Empty connection ID - "Connection ID cannot be empty. Please provide a Connection ID from the Connect node."
- Invalid connection ID format - "Err.InvalidArg"
Usage Notes
- Always use this node at the end of your Leonardo AI workflows to properly clean up resources
- The connection ID must come from a Connect node earlier in the flow
- After disconnection, the connection ID can no longer be used
- It's good practice to disconnect even if errors occur during the flow execution