AliyunBaiLian icon

AliyunBaiLian

使用阿里云百炼API

Actions4

Overview

This node integrates with an AI service to generate videos from text prompts. It allows users to create videos by providing descriptive text (prompts) and optional negative prompts to exclude unwanted content. The node supports asynchronous task handling, including polling for task completion, making it suitable for workflows that require automated video generation based on textual descriptions.

Common scenarios:

  • Creating short promotional or social media videos from simple text descriptions.
  • Generating visual content for storytelling or presentations without manual video editing.
  • Automating video creation in content pipelines where input is dynamically generated text.

Practical example:

  • Input a prompt like "A cute kitten running" to generate a short video clip depicting that scene.
  • Use negative prompts such as "blurry, low quality" to avoid undesired visual artifacts.
  • Configure video duration, resolution, and random seed for reproducible results.

Properties

Name Meaning
模型 (model) The model to use for video generation. Options: "Text To Video".
提示词 (prompt) Text description used to generate the video.
负面提示词 (negativePrompt) Content to exclude from the video (e.g., "blurry", "low quality").
是否持续轮询任务结果 (waitingForTask) Whether to wait and poll until the video generation task completes.
轮询时间间隔 (interval) Time interval in milliseconds between status checks when polling for task completion.
最长等待时间 (maxWaitTime) Maximum time in seconds to wait for the task to complete before timing out.
高级选项 (additionalOptions) Collection of advanced options:
- 视频时长 (duration): Video length in seconds.
- 图片宽度 (width): Video width in pixels.
- 图片高度 (height): Video height in pixels.
- 种子值 (seed): Random seed for reproducibility; 0 means random.

Output

The node outputs JSON data representing the response from the video generation API. This includes:

  • Task information such as task_id if the operation is asynchronous.
  • Final video generation result once the task completes, which typically contains URLs or metadata about the generated video.
  • If polling is enabled, the output will be the completed task result after waiting.
  • The output does not directly include binary video data but provides references or links to access the generated video.

Dependencies

  • Requires an API key credential for authenticating with the external AI video generation service.
  • Uses HTTP requests to communicate with the service's REST API endpoints.
  • The node depends on n8n's ability to handle asynchronous operations and polling mechanisms.

Troubleshooting

  • Polling failures: If the node fails while polling for task completion, it throws an error indicating polling failure. Ensure network connectivity and that the API key is valid.
  • Timeouts: If the maximum wait time is too short, the task may not complete in time, resulting in incomplete results. Increase the max wait time or disable waiting to handle asynchronously.
  • Invalid prompts: Providing empty or nonsensical prompts may cause the API to return errors or no meaningful video. Always provide clear descriptive text.
  • API authentication errors: Invalid or missing API keys will cause authorization failures. Verify the API key configuration in n8n credentials.
  • Parameter validation: Ensure numeric parameters like duration, width, height, and seed are within acceptable ranges supported by the API.

Links and References

Discussion