Overview
The node provides a "图生视频" (image-to-video) operation under the "视频生成" (video generation) resource. It generates short videos based on either a text prompt describing a scene or an input image URL. Users can select different video generation models and specify the desired video duration. This node is useful for creating quick, AI-generated videos from textual descriptions or images, which can be applied in content creation, marketing, social media posts, or prototyping visual ideas.
For example:
- Generating a 5-second video of "a 3D little boy skateboarding in the park" from a text prompt.
- Creating a video based on a provided image URL using a specific model.
Properties
| Name | Meaning |
|---|---|
| 提示词 (prompt) | Text prompt describing the video content to generate, e.g., "A 3D little boy skateboarding." |
| 图片地址 (url) | URL of an image to base the video generation on instead of a text prompt. |
| 模型 (modal) | Video generation model to use. Options: video-S2.0, video-S2.0-Pro, video-S3.0, video-S3.0-pro. |
| 视频时长 (duration_ms) | Duration of the generated video in milliseconds. Options: 5000 (5 seconds), 10000 (10 seconds). Note: Models video-S2.0 and video-S2.0-Pro only support 5 seconds. |
| 是否等待视频返回 (isImgReturn) | Boolean flag indicating whether to wait for the video generation to complete and return the video data. |
Output
The node outputs JSON data representing the result of the video generation operation. The exact structure depends on the underlying API response but typically includes metadata about the generated video and possibly URLs or binary references to the video file.
If the node supports returning binary data, it would represent the generated video content itself, allowing downstream nodes to process or save the video.
Dependencies
- Requires an API key credential for authentication with the external video generation service.
- The node relies on an external plugin or resource factory (
plugins-help) to build its properties and call the appropriate API methods. - Proper configuration of the API credentials within n8n is necessary for successful execution.
Troubleshooting
- Common issues:
- Using unsupported video durations with certain models (e.g., requesting 10 seconds with
video-S2.0). - Providing invalid or inaccessible image URLs.
- Network or authentication errors due to missing or incorrect API credentials.
- Using unsupported video durations with certain models (e.g., requesting 10 seconds with
- Error messages:
"未实现方法: 视频生成.图生视频"indicates the requested resource-operation combination is not implemented; verify the resource and operation names.- API errors returned from the external service will be propagated; check logs for detailed error messages.
- Resolutions:
- Ensure the selected model supports the requested video duration.
- Validate image URLs before use.
- Confirm API credentials are correctly set up and have sufficient permissions.
Links and References
- No direct links available from the source code.
- For more information, consult the documentation of the external video generation API used by this node.