Overview
This node integrates with the Stability AI API to generate images from text prompts using different image generation services. It supports multiple models and styles, allowing users to create high-quality images tailored to their needs. Common use cases include generating artwork, concept visuals, or creative images for marketing, design, or entertainment purposes.
For example, a user can input a descriptive prompt like "a futuristic cityscape at sunset" and select an image service and style preset to produce a unique digital artwork. The node also supports specifying negative prompts to exclude unwanted elements, setting aspect ratios, and controlling randomness via seeds.
Properties
Name | Meaning |
---|---|
Image Service | Selects the image generation backend: - Stable Image Core: High-speed, best quality. - Stable Image Ultra: Highest quality with advanced prompt understanding. - Stable Diffusion 3.0 & 3.5: Uses Stable Diffusion models. |
Prompt | The main text description guiding the image generation. Required. |
Output Format | The desired image file format: PNG, JPEG, or WebP. |
Source Image | (Optional) A source image string used as input for image-to-image generation or modification. |
Strength | (Optional) Numeric value indicating how strongly the source image influences the output (likely for image-to-image scenarios). |
Aspect Ratio | The width-to-height ratio of the generated image. Options include 1:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, and 9:21. Required. |
Negative Prompt | Text describing elements to avoid in the generated image. Optional. |
Seed | Numeric seed for random number generation to allow reproducible outputs. Default is 0 (random). |
Put Output In Field | The name of the output field where the binary image data will be stored. Default is "data". Required. |
SD3 Model | (Only for Stable Diffusion 3.x service) Selects the specific Stable Diffusion 3.x model variant: - Stable Diffusion 3.5 Large - Stable Diffusion 3.0 Large Turbo - Stable Diffusion 3.0 Medium - Stable Diffusion 3.5 Large Turbo - Stable Diffusion 3.5 Medium |
Style Preset | (Only for Stable Image Core service) Selects a style preset to influence the artistic style of the output image. Options include: 3D Model, Analog Film, Anime, Cinematic, Comic Book, Digital Art, Enhance, Fantasy Art, Isometric, Line Art, Low Poly, Modeling Compound, Neon Punk, Origami, Photographic, Pixel Art, Tile Texture |
Output
The node outputs the generated image data in binary form placed inside the specified output field (default "data"). This binary data represents the image file encoded in the selected output format (PNG, JPEG, or WebP). The output JSON structure contains this binary data ready for further processing or saving.
Dependencies
- Requires access to the Stability AI API.
- Needs an API authentication token configured in n8n credentials to authorize requests.
- Network connectivity to
https://api.stability.ai
. - No other external dependencies are indicated.
Troubleshooting
- Unsupported image service error: Occurs if an invalid or unsupported image service option is selected. Ensure the "Image Service" property is set to one of the supported options.
- API authentication errors: If the API key is missing or invalid, the node will fail to authenticate. Verify that the API credential is correctly configured.
- Invalid prompt or parameters: Empty or malformed prompts may cause the API to reject the request. Provide meaningful text prompts and valid parameter values.
- Output field conflicts: If the output field name clashes with existing fields, it may overwrite data unexpectedly. Use unique output field names.
- Network issues: Connectivity problems to the Stability AI endpoint will cause failures. Check internet connection and firewall settings.