Customize your input with more control.
Customize your input with more control.
Customize your input with more control.
Your request will cost $0.4 per video.
Your request will cost $0.4 per video.
Transform static prompts into dynamic, high-quality videos with Hunyuan Video. This powerful open-source AI model enables developers and creators to generate engaging video content through a simple API interface.
Hunyuan Video is an Open video generation model with high visual quality, motion diversity, text-video alignment, and generation stability. This endpoint generates videos from text descriptions through the fal.ai platform. Whether you're building creative tools, content applications, or enterprise solutions, you can easily integrate video generation into your workflow.
Getting up and running with Hunyuan Video takes just a few minutes. Here's how to begin:
First, install your preferred SDK:
For JavaScript/TypeScript:
bashnpm install --save @fal-ai/client
For Python:
bashpip install fal-client
Configure your authentication credentials:
JavaScript:
javascriptimport { fal } from "@fal-ai/client"; fal.config({ credentials: "YOUR_FAL_KEY_HERE" });
Python:
pythonimport fal_client as fal import os os.environ["FAL_KEY"] = "YOUR_FAL_KEY_HERE"
Generate your first video with this simple example:
JavaScript:
javascriptimport { fal } from "@fal-ai/client"; const result = await fal.subscribe("fal-ai/hunyuan-video", { input: { prompt: "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse." } }); console.log(result.data.video.url);
Python:
pythonimport fal_client as fal result = fal.subscribe("fal-ai/hunyuan-video", { "prompt": "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse." }) print(result.video.url)
javascript{ "prompt": "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse.", "num_inference_steps": 30, "aspect_ratio": "16:9", "resolution": "720p", "num_frames": 129, "enable_safety_checker": true }
For production applications, consider this more robust implementation:
javascriptimport { fal } from "@fal-ai/client"; async function generateVideo(prompt, options = {}) { try { const result = await fal.subscribe("fal-ai/hunyuan-video", { input: { prompt, num_inference_steps: options.steps || 30, pro_mode: options.proMode || false, aspect_ratio: options.aspectRatio || "16:9", resolution: options.resolution || "720p", num_frames: options.frames || 129, enable_safety_checker: options.safetyCheck || false } }); return result; } catch (error) { console.error("Video generation failed:", error); throw new Error("Failed to generate video"); } }
For production applications, use the queue API:
javascript// Submit request const { request_id } = await fal.queue.submit("fal-ai/hunyuan-video", { input: { prompt: "A stylish woman walks down a Tokyo street filled with warm glowing neon and animated city signage. She wears a black leather jacket, a long red dress, and black boots, and carries a black purse." }, webhookUrl: "https://optional.webhook.url/for/results" }); // Check status const status = await fal.queue.status("fal-ai/hunyuan-video", { requestId: request_id, logs: true }); // Get result when complete const result = await fal.queue.result("fal-ai/hunyuan-video", { requestId: request_id });
javascript{ "video": { "url": "https://v3.fal.media/files/kangaroo/y5-1YTGpun17eSeggZMzX_video-1733468228.mp4", "content_type": "video/mp4", "file_name": "generated_video.mp4", "file_size": 2048576 }, "seed": 1234567890 }
To get the most out of Hunyuan Video:
Model Architecture:
Performance:
Related Hunyuan Video models available:
For optimal performance:
Access comprehensive support through:
Get started with Hunyuan Video today and bring your creative visions to life through dynamic, AI-generated video content.