Video Generation

Generate videos from text prompts or images with asynchronous task polling.

Updated Apr 19, 2025
One-click install
npx skills add https://github.com/SamuelRM25/app-visitador --skill video-generation-samuelrm25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Video Generation
Source: https://github.com/SamuelRM25/app-visitador/tree/main/skills/video-generation
Command: npx skills add https://github.com/SamuelRM25/app-visitador --skill video-generation-samuelrm25

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires z-ai-web-dev-sdk, and includes scripts (resource) components.

What problem does it solve?

This Skill enables developers to generate AI-powered videos from text prompts or input images, automating video production workflows and enabling rapid content creation for apps and services.

Core Features & Use Cases

  • Asynchronous video tasks: Create video generation tasks and poll for results, enabling scalable media generation.
  • Text-to-video & image-to-video: Generate videos from textual prompts or input images with configurable size, fps, duration, and quality.
  • Real-world scenarios: Build marketing clips, educational tutorials, game trailers, or cinematic previews by automating video content creation.

Quick Start

Install dependencies and run the sample task to generate a video. Then poll for results to obtain the video URL.

  • CLI: z-ai video -p "A cat playing with a ball" --poll
  • SDK basics: const zai = await ZAI.create(); const task = await zai.video.generations.create({ prompt: "A cat...", quality: "speed", duration: 5, fps: 30 }); const result = await zai.async.result.query(task.id);

Frequently Asked Questions about Video Generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate AI videos from text prompts or images using an SDK?

You can generate AI videos from text prompts or images by creating asynchronous video generation tasks via the z-ai-web-dev-sdk. Configure parameters like prompt, quality, duration, and fps, then submit the task to start backend-based media creation.

How does asynchronous polling work for retrieving video generation results?

Asynchronous polling retrieves video generation results by querying a task ID after submission. You create a generation task, receive a task ID, and periodically poll the async result endpoint until the video processing completes and returns the final video URL.

What configurable options are available when creating AI-generated videos?

When creating AI-generated videos, configurable options include size, fps, duration, and quality. You can set these parameters to generate text-to-video or image-to-video outputs tailored to specific application requirements.

Can I use the z-ai-web-dev-sdk for backend video generation workflows?

Yes, the z-ai-web-dev-sdk supports backend video generation workflows by enabling asynchronous task management. It allows you to automate media creation, poll for results, and retrieve video URLs for scalable application integration.

What are the limitations of asynchronous video generation tasks?

Asynchronous video generation tasks require polling to retrieve results, meaning processing is not instantaneous. You must manage task IDs and query intervals to successfully obtain the final video URL, which may impact real-time application responsiveness.