Actions4
- Image Actions
- Video Actions
Overview
This node integrates with the ImageRouter.io API to generate AI-created images or videos based on text prompts or existing media inputs. It supports operations such as converting text to images, images to images, text to videos, and images to videos, as well as retrieving available AI models.
A common use case is generating creative visuals from descriptive text prompts for marketing, design, or content creation workflows. For example, a user can input a prompt like "a futuristic cityscape at sunset" and receive an AI-generated image URL or base64 data. Another scenario includes editing an existing image by providing it as binary input to create variations or enhancements.
Properties
| Name | Meaning |
|---|---|
| Model | The AI model to use for generation (e.g., "test/test"). |
| Prompt | Text description guiding the image or video generation. |
| Quality | Generation quality level; options: auto, low, medium, high (if supported by the model). |
| Size | Output size of the generated media; either "auto" or specific dimensions like "1024x1024". |
| Response Format | Format of the output; either a URL pointing to the generated media or Base64 JSON data. |
Output
The node outputs an array of items where each item's json field contains the response from the ImageRouter API. This response typically includes URLs or base64-encoded data representing the generated image or video, depending on the selected response format.
If binary input was provided (for image-to-image or image-to-video operations), the node sends the media along with the prompt to the API and returns the generated result similarly.
Dependencies
- Requires an API key credential for ImageRouter.io configured in n8n.
- Uses HTTP requests authenticated via this API key to communicate with the ImageRouter API endpoint (
https://api.imagerouter.io/v1).
Troubleshooting
- Binary Property Not Found: If you specify a binary property for input media but it does not exist on the input item, the node will throw an error indicating the missing binary property. Ensure the binary data is correctly passed into the node.
- Mask Binary Property Missing: For image-to-image operations requiring a mask, if the mask binary property is missing, an error will be thrown. Verify that the mask image is properly attached.
- API Errors: Any issues with authentication or invalid parameters will result in errors from the API. Double-check your API key and parameter values like model name, prompt, and size.
- Unsupported Size or Quality: Some models may not support all sizes or quality settings. Use "auto" or consult the model documentation to avoid errors.
Links and References
- ImageRouter.io API Documentation (for detailed API capabilities and model info)
- n8n HTTP Request Node Documentation (for understanding HTTP request handling in n8n)