Stability AI
The Stability AI piece in ZBrain Flow enables AI-powered image generation and custom API interactions. This integration allows you to generate high-quality images from text descriptions or interact directly with Stability AI’s API for advanced customization. By using Stability AI in your workflows, you can automate image creation and integrate AI-driven visuals seamlessly into your applications.
How to Use Stability AI in ZBrain Flow
Select Stability AI as Your Connection
Click on the ‘+’ button in the Flow.
Search for ‘Stability AI’ and select it.
Choose the action you want to perform. ZBrain Flow provides the following options:
‘Text to Image’ – Generate an image from a text prompt.
‘Custom API Call’ – Send a request to a specific Stability AI API endpoint.
How to Generate Images Using Stability AI in ZBrain Flow
Step 1: Create a Stability AI Connection
In the ‘Connection’ dropdown, click on 'create connection'.
A small window will appear. Fill in the following details:
‘Connection Name’ – Enter a name for this Stability AI connection.
‘API Key’ – Obtain your API key from Stability AI’s authentication guide and enter it here.
Click ‘Save’.
Step 2: Configure the Image Generation Request
In the ‘Prompt’ field, enter a text description of the image you want to generate.
(Optional) Adjust advanced settings:
‘cfg_scale’ – Controls how closely the image adheres to the prompt (Range: 0–35, default: 7).
‘height’ and ‘width’ – Define image dimensions in increments of 64 (minimum: 128 pixels).
‘samples’ – Set the number of images to generate (maximum: 10).
‘steps’ – Specify the number of diffusion steps (Range: 10–150).
‘weight’ – Adjusts the influence of the prompt.
‘clip_guidance_preset’ – Select additional guidance for image generation.
‘style_preset’ – Apply a predefined artistic style (Photographic, anime, fantasy art).
‘Engine ID’ – Choose the Stability AI model to use for generation.
How to Use Stability AI Custom API Call in ZBrain Flow
Step 1: Create a Stability AI Connection
Follow the steps from the ‘Step 1: Create a Stability AI Connection’ section above to set up your Stability AI connection.
Step 2: Set Up the API Request
In the ‘URL’ field, enter the base API URL: 'https://api.stability.ai/v1'. Add the specific API endpoint you want to use, such as '/models' for retrieving available models.
From the ‘Method’ dropdown, choose the HTTP method (GET, POST, etc.) based on the API call’s requirements.
Step 3: Configure Request Parameters
Headers – Click ‘Add Item’ to include any additional headers. Note that authorization headers are automatically added from your connection.
Query Parameters – Click ‘Add Item’ to include optional filters or settings.
Body – If the API request requires a request body, add the necessary JSON structure.
Step 4: Set Additional Options
‘No Error on Failure’ – Enable this if you want the workflow to continue even if the API call encounters an error.
‘Timeout (in seconds)’ – Set the maximum wait time before the request times out.
Last updated