Skip to main content

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:

  1. Retrieves the API key from the provided credentials
  2. Creates a unique connection identifier
  3. Stores the API key associated with the connection ID in a secure session
  4. Returns the connection ID that references the stored credentials
  5. 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:

  1. Create a credential in Robomotion with your Stability AI API key from platform.stability.ai
  2. Add a Connect node at the start of your flow
  3. Select your API key credential in the node's options
  4. Use the Connection Id output in subsequent Stability AI nodes (TextToImages, ImageToImages, etc.)
  5. 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

  1. Visit platform.stability.ai
  2. Sign up or log in to your account
  3. Navigate to your API keys section
  4. Create a new API key or copy an existing one
  5. Store the key securely in Robomotion's vault