Hailuo Image to Video icon

Hailuo Image to Video

Generate video from image using Hailuo API

Overview

This node generates videos from input images using the Hailuo API. It transforms a single image (JPG/PNG) into a short video clip by applying different AI-driven models that animate or add camera movements to the image. This is useful for content creators, marketers, or developers who want to create engaging video content from static images without manual video editing.

Common scenarios include:

  • Creating dynamic social media posts from photos.
  • Generating promotional videos with subtle animations.
  • Producing video previews or teasers from product images.
  • Adding camera movement effects like pans or zooms based on text prompts.

For example, you can input a photo URL and select the "Image to Video Director" model to generate a video with custom camera movements described in your prompt, such as "[Pan left]" or "[Push in]".

Properties

Name Meaning
Image URL URL of the input image (JPG/PNG, 300-4096px, aspect ratio 2:5 to 5:2, max 10MB).
Model The AI model used for video generation. Options:
- Image to Video (i2v-01): Standard model.
- Image to Video Live (i2v-01-live): More natural movements.
- Image to Video Director (i2v-01-director): Supports camera movement control via prompt.
- Image to Video v2 (i2v-02): Advanced model with duration and resolution options.
Text Prompt Text guiding the video generation (max 2000 characters). Required for "Image to Video Director", optional otherwise. For director model, use camera instructions like "[Pan left]".
Expand Prompt Boolean flag to expand the input prompt automatically by adding details.
Duration (seconds) Duration of generated video (only for i2v-02 model). Options: 6 seconds or 10 seconds (10s not available with 1080p).
Resolution Resolution of generated video (only for i2v-02 model). Options: 768p or 1080p (1080p not available with 10s duration).
Wait for Completion Whether to wait for the video generation task to complete before returning output.
Maximum Retries Max number of status checks when waiting for completion (shown only if waiting enabled).
Retry Interval (ms) Time in milliseconds between status checks when waiting for completion (shown only if waiting enabled).

Output

The node outputs JSON data containing information about the video generation task:

  • If not waiting for completion, the output JSON includes initial task data returned by the API, typically including a task ID and status.
  • If waiting for completion, the output JSON contains the final task result once the video generation finishes, which likely includes the video URL or metadata.

No binary data output is produced directly by this node; it returns JSON with video generation details or errors.

Dependencies

  • Requires an API key credential for the Hailuo API service (referred generically as an API authentication token).
  • Uses the Hailuo API endpoint /api/v1/task to submit video generation tasks.
  • The node relies on internal helper functions to make authenticated HTTP requests and optionally poll for task completion.

Troubleshooting

  • Error: "1080p resolution with 10 seconds duration is not supported."
    This occurs if you select 1080p resolution together with 10 seconds duration for the i2v-02 model. To fix, choose either 768p resolution or reduce duration to 6 seconds.

  • Task never completes when waiting for completion:
    Increase the maximum retries or retry interval to allow more time for the video generation process.

  • Invalid image URL or unsupported image format:
    Ensure the image URL points to a valid JPG or PNG image within size and dimension limits.

  • API authentication errors:
    Verify that the API key credential is correctly configured and has necessary permissions.

Links and References

Discussion