ImageRouter icon

ImageRouter

Generate AI images and videos through ImageRouter.io

Overview

The node "ImageRouter" integrates with the ImageRouter.io API to generate AI-based images and videos. It supports multiple operations including converting text prompts into images or videos, transforming existing images into new images or videos, and retrieving available AI models.

For the Video - Image to Video operation specifically, the node takes an input image (optionally from binary data) and a text prompt, then generates a video based on these inputs using a specified AI model. This is useful for creative content generation, marketing videos, or any scenario where you want to animate or transform static images into dynamic video content driven by AI.

Practical examples:

  • Creating short promotional videos from product images with descriptive prompts.
  • Generating animated storyboards from concept art.
  • Transforming user-uploaded photos into stylized video clips.

Properties

Name Meaning
Model The AI model to use for generating the video. Example: "test/test".
Prompt Text description guiding the video generation process.
Image Optional binary property name containing the source image to convert into a video. Leave empty to generate video from text only.
Quality Generation quality level if supported by the model. Options: auto, low, medium, high.
Size Output video size, either "auto" or custom dimensions in "WIDTHxHEIGHT" format (e.g., "1024x1024").
Response Format Format of the response. Options: URL (link to generated video) or Base64 JSON (video encoded in base64).

Output

The node outputs an array of JSON objects, each representing the API response for the generation request. The structure depends on the chosen response format:

  • If Response Format is URL, the output JSON contains URLs pointing to the generated video files.
  • If Response Format is Base64 JSON, the output JSON includes the video data encoded as a Base64 string.

No direct binary output is produced by the node; instead, video data is provided via URL or embedded Base64 JSON.

Example output snippet when using URL response format:

[
  {
    "json": {
      "created": 1680000000,
      "data": [
        {
          "url": "https://imagerouter.io/generated/video123.mp4"
        }
      ]
    }
  }
]

Dependencies

  • Requires an API key credential for ImageRouter.io configured in n8n.
  • Uses the ImageRouter.io REST API endpoint at https://api.imagerouter.io/v1.
  • The node uses HTTP POST requests with multipart form-data when sending binary image data.
  • The node expects input binary data to be present under the specified binary property name.

Troubleshooting

  • Binary Property Not Found: If the specified binary property for the input image is missing or empty, the node throws an error indicating the binary property was not found. Ensure the input item contains the correct binary data under the given property name.
  • Mask Binary Property Missing: Although not applicable for video operation, if used incorrectly, missing mask binary properties will cause errors.
  • API Authentication Errors: If the API key is invalid or missing, requests will fail. Verify that the API key credential is correctly set up in n8n.
  • Invalid Model or Parameters: Using unsupported model names or invalid size/quality parameters may result in API errors. Double-check parameter values against ImageRouter.io documentation.
  • Response Format Issues: Selecting an unsupported response format for the model might cause unexpected results or errors.

Links and References


This summary focuses on the "Video" resource and "Image to Video" operation as requested, extracting relevant properties and logic from the provided source code and property definitions.

Discussion