Overview
This node generates videos from descriptive text prompts using the PiAPI Dream Machine Text-to-Video service. It allows users to specify various parameters such as the model version, video duration, and aspect ratio to customize the generated video output.
Common scenarios where this node is beneficial include:
- Creating short promotional or social media videos based on textual descriptions.
- Generating visual content for storytelling or marketing without needing manual video editing.
- Rapid prototyping of video concepts from simple text inputs.
For example, a user can input a prompt like "A serene sunset over a mountain lake" and receive a 5-second video clip generated by the selected AI model.
Properties
| Name | Meaning |
|---|---|
| Prompt | Descriptive text prompt used to generate the video. |
| Model Name | The AI model used for video generation. Options: Ray v1, Ray v2. |
| Duration | Length of the generated video in seconds. Options: 5 seconds, 10 seconds (10s only for text-to-video). |
| Aspect Ratio | Aspect ratio of the video frame. Options: Portrait (9:16), Portrait (3:4), Square (1:1), Landscape (4:3), Landscape (16:9), Cinematic (21:9). |
| Service Mode | Processing mode for the task. Options: Default (user workspace setting), Pay-as-you-go, Host-your-account. |
| Wait for Completion | Boolean flag to wait for the video generation task to complete before returning results. |
Output
The node outputs JSON data containing the response from the video generation API. If the "Wait for Completion" option is enabled, the output includes the completed task details with the generated video information.
The JSON structure typically contains:
- Task metadata such as task ID and status.
- Video generation results including URLs or references to the generated video.
- Error messages if the generation fails.
No binary data output is directly handled by the node; video content is referenced via URLs or similar metadata in the JSON output.
Dependencies
- Requires an API key credential for authenticating with the PiAPI Dream Machine service.
- Uses the PiAPI endpoint
/api/v1/taskto submit video generation tasks. - Supports asynchronous waiting for task completion if configured.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing unsupported combinations of properties (e.g., 10-second duration with incompatible models) may result in errors.
- Network or service downtime can lead to request timeouts or failures.
Error messages:
- Errors returned from the API are captured and included in the output JSON under an
errorfield if "Continue On Fail" is enabled. - Typical error messages relate to invalid prompts, unsupported model names, or exceeded usage limits.
- Errors returned from the API are captured and included in the output JSON under an
Resolutions:
- Verify that the API key credential is correctly configured and has sufficient permissions.
- Ensure property values conform to allowed options.
- Enable "Wait for Completion" cautiously, as long-running tasks might delay workflow execution.