Actions6
- Chat Actions
- Embedding Actions
- Image Actions
- Speech Recognition Actions
- Text to Speech Actions
Overview
This node integrates with the DeepInfra API to generate images based on text prompts using various AI models. It is designed for scenarios where users want to create AI-generated images from descriptive text, such as generating artwork, concept visuals, or creative illustrations automatically.
Typical use cases include:
- Creating unique images for marketing materials or social media posts.
- Generating concept art or design prototypes from textual descriptions.
- Automating image creation workflows in content production pipelines.
For example, a user can input a prompt like "a futuristic cityscape at sunset" and select a preferred AI model to generate one or more images matching that description.
Properties
| Name | Meaning |
|---|---|
| Model | The AI model used for image generation. Options include various versions of Stable Diffusion, Black-Forest-Labs FLUX models, Deepseek-Ai Janus-Pro models, and others. Example: "Stabilityai Stable-Diffusion-Xl-Base-1.0". |
| Prompt | The text prompt describing what the generated image should depict. |
| Options | A collection of optional parameters to customize image generation: |
| Number of Images (n) | How many images to generate (default is 1). |
| Size | The resolution of the generated images. Options: "512x512", "768x768", "1024x1024" (default "1024x1024"). |
| Negative Prompt | Text describing elements to avoid in the generated image. |
| Steps | Number of diffusion steps to run during generation (default 30), affecting quality and detail. |
Output
The node outputs an array of JSON objects, each representing the result of an image generation request. The main json output field contains the response from the DeepInfra API's image generation endpoint, which typically includes:
- URLs or base64 data of the generated images.
- Metadata about the generation process (model used, parameters).
- Any error messages if generation failed.
No binary data output is produced by this operation.
Dependencies
- Requires an active DeepInfra API key credential configured in n8n.
- Uses the DeepInfra OpenAI-compatible client library internally.
- Network access to
https://api.deepinfra.com/v1/openaiis necessary.
Troubleshooting
Common issues:
- Invalid or missing API key will cause authentication errors.
- Requesting unsupported image sizes or invalid model names may lead to API errors.
- Generating too many images or using very high step counts might cause timeouts or rate limiting.
Error messages:
- Authentication failures: Ensure the API key credential is correctly set up.
- Parameter validation errors: Check that all required fields (Model, Prompt) are provided and valid.
- API limit exceeded: Reduce number of images or frequency of requests.