Connect
Establishes a connection to the Stability AI API and creates a session for use in subsequent Stability AI operations.
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.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Options
- API Key - Your Stability AI API key for authentication. This is a credential field that securely stores your Stability AI API key.
Output
- Connection Id - A unique identifier for the Stability AI session that must be used in subsequent Stability AI operations.
How It Works
The Connect node is the first step in any Stability AI automation flow. It creates a secure connection to the Stability AI API and returns a connection ID that is used by all other Stability AI nodes in the flow.
When executed, the node:
- Retrieves the API key from the provided credentials
- Creates a unique connection identifier
- Stores the API key associated with the connection ID in a secure session
- Returns the connection ID that references the stored credentials
- This connection ID is then used by other Stability AI nodes to access the API
Requirements
- A valid Stability AI account and API key (can be generated at platform.stability.ai)
- The API key must be stored as a credential in Robomotion's vault
Error Handling
The node will return specific errors in the following cases:
- Invalid or missing API key credential
- Empty API key value in the credential
Usage Notes
- The Connect node should be executed before any other Stability AI operations
- The returned Connection Id must be passed to subsequent Stability AI nodes
- Each Connect node creates a new session that should be cleaned up with a Disconnect node
- For security, always use the Disconnect node to remove the stored credentials when they're no longer needed
- The session is stored in memory only and is automatically removed when the flow stops
Best Practices
- Store your Stability AI API key as a credential rather than hardcoding it
- Use a single Connect node at the beginning of your flow
- Always pair Connect with Disconnect nodes to properly clean up resources
- Handle errors appropriately to prevent credential leaks
- Monitor your Stability AI credit usage to avoid unexpected costs
Example Flow
Basic Setup:
- Create a credential in Robomotion with your Stability AI API key from platform.stability.ai
- Add a Connect node at the start of your flow
- Select your API key credential in the node's options
- Use the Connection Id output in subsequent Stability AI nodes (TextToImages, ImageToImages, etc.)
- Add a Disconnect node at the end to clean up
Typical Flow Structure:
Connect → GetUserCredit (check balance) → TextToImages (generate image) → Disconnect
Getting Your API Key
- Visit platform.stability.ai
- Sign up or log in to your account
- Navigate to your API keys section
- Create a new API key or copy an existing one
- Store the key securely in Robomotion's vault