PiAPI WanX Text to Video icon

PiAPI WanX Text to Video

Generate videos from text using PiAPI WanX

Overview

This node generates videos from textual descriptions using the PiAPI WanX service. It is designed to convert detailed prompts into short video clips, supporting various models and styles including advanced animation effects like Studio Ghibli style. This node is useful for content creators, marketers, or developers who want to automate video generation based on text input without manual video editing.

Practical examples:

  • Creating animated promotional videos from product descriptions.
  • Generating stylized short clips for social media posts.
  • Producing artistic animations in specific styles such as pixel art or Ghibli animation.

Properties

Name Meaning
Prompt Descriptive text prompt that guides the video generation process.
Negative Prompt Text specifying elements or features to exclude from the generated video.
Model The WanX model used for video generation. Options:
- Lightweight (1.3B): Basic text-to-video model, lower cost.
- Advanced (14B): More powerful model with higher quality.
- Ghibli Animation (14B): Studio Ghibli-style animation.
Aspect Ratio Aspect ratio of the output video. Options: Landscape (16:9), Portrait (9:16).
Use LoRA Whether to apply LoRA (Low-Rank Adaptation) style control. Only available when using the Ghibli Animation model.
LoRA Type Style type to apply via LoRA. Includes various animation and visual effects such as Default Ghibli Style, Flat Color Style, Rotation Effect, Pixel Art, Super Saiyan Effect, and several NSFW options.
LoRA Strength Intensity of the LoRA style effect, ranging from 0.0 (no effect) to 1.0 (full effect).
Wait for Completion Whether the node should wait for the video generation task to complete before returning results.

Output

The node outputs JSON data containing the response from the WanX API. If "Wait for Completion" is enabled, the output includes the completed video generation result; otherwise, it returns the initial task creation response.

The JSON typically contains:

  • Task details including a unique task ID.
  • Status information about the video generation.
  • When completed, URLs or references to the generated video file(s).

Binary data is not directly output by this node; instead, video files are referenced via URLs in the JSON response.

Dependencies

  • Requires an API key credential for the PiAPI WanX service.
  • Uses the PiAPI endpoint /api/v1/task to submit video generation tasks.
  • The node depends on internal helper functions to send requests and optionally poll for task completion.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing an empty or poorly descriptive prompt may result in unsatisfactory or failed video generation.
    • Selecting incompatible combinations of model and LoRA options can cause errors.
    • Network or API downtime can interrupt task submission or status polling.
  • Error messages:

    • Errors returned from the API are propagated and can include messages about invalid parameters or quota limits.
    • If "Continue On Fail" is enabled, errors are returned as JSON objects with an error field instead of stopping execution.
  • Resolutions:

    • Ensure valid and active API credentials are configured.
    • Provide clear and meaningful prompts.
    • Match LoRA options only with the supported model (txt2video-14b-lora).
    • Check network connectivity and API service status.

Links and References

Discussion