Video Generation
HiAPI supports multiple video generation models for text-to-video and image-to-video tasks.
Available Models
Section titled “Available Models”| Model | Provider | Mode | Best For |
|---|---|---|---|
| HappyHorse 1.0 | Alibaba | Text to video | Short-form, ad storyboards, social media clips |
| Kling 3.0 | Kuaishou | Text to video | Cinematic motion and action-heavy shots |
| Seedance 1.0 Pro | ByteDance | Text to video | Cost-aware batches and early prototypes |
| Seedance 1.5 Pro | ByteDance | Text to video | Narrative clips with native audio |
| Seedance 2.0 | ByteDance | Text or image to video | Unified video workflows |
| Wan 2.7 T2V | Alibaba | Text to video | General short-form videos |
| Wan 2.7 I2V | Alibaba | Image to video | Animating still images |
For live prices, duration examples, and resolution multipliers, use HiAPI Pricing.
Text-to-Video
Section titled “Text-to-Video”curl -X POST https://api.hiapi.ai/v1/videos \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-t2v", "prompt": "A Shiba Inu chasing butterflies under cherry blossoms", "size": "1920*1080", "seconds": "5" }'import requests
response = requests.post( "https://api.hiapi.ai/v1/videos", headers={ "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, json={ "model": "wan2.7-t2v", "prompt": "A Shiba Inu chasing butterflies under cherry blossoms", "size": "1920*1080", "seconds": "5" })
video_id = response.json()["id"]print(f"Task created: {video_id}")Image-to-Video
Section titled “Image-to-Video”Animate a still image into a video using Wan 2.7 I2V:
curl -X POST https://api.hiapi.ai/v1/videos \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "wan2.7-i2v", "prompt": "The scene comes alive with gentle wind", "input_reference": "https://example.com/photo.jpg", "seconds": "5" }'Async Task Pattern
Section titled “Async Task Pattern”Video generation is asynchronous. The API returns a top-level id — poll for the result:
import timeimport requests
# 1. Submit taskresponse = requests.post( "https://api.hiapi.ai/v1/videos", headers={"Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json"}, json={"model": "wan2.7-t2v", "prompt": "sunset timelapse", "seconds": "5"})video_id = response.json()["id"]
# 2. Poll for resultwhile True: result = requests.get( f"https://api.hiapi.ai/v1/videos/{video_id}", headers={"Authorization": "Bearer YOUR_API_KEY"} ).json() if result["status"] == "completed": print("Video URL:", result.get("metadata", {}).get("url")) break time.sleep(5)Video Parameters
Section titled “Video Parameters”| Parameter | Values | Models |
|---|---|---|
seconds | 3, 5, 8, 10, 12, 15 | Wan 2.7, Seedance |
size | 1920*1080, 1080*1920, 1280*720 | Wan 2.7 |
seconds | 3, 5, 8, 10, 15 | Kling |