Video Generation
Hunyuan Video Generation API Documentation#
Overview#
PiAPI's Hunyuan Video Generation service provides text-to-video capabilities with two different models optimized for different use cases. The service supports both standard and fast video generation options, each with specific characteristics and pricing. Hunyuan Video Model Can Do NSFWPricing#
Model | Resolution | FPS | Steps | Price (USD) |
---|
txt2video | 480x848/640x640 | 85 | 20 | $0.09 |
fast-txt2video | 480x848/640x640 | 85 | 6 | $0.03 |
img2video-concat | 544x960/720x720 | 85 | 20 | $0.09 |
img2video-replace | 544x960/720x720 | 85 | 20 | $0.09 |
txt2video-lora | 480x848/640x640 | 85 | 20 | $0.09 |
Standard Text-to-Video (txt2video)#
Model Name: Qubico/hunyuan
Quality Focus: Higher quality with more processing steps (20 steps)
Best For: Projects requiring higher quality output
Fast Text-to-Video (fastvideo-txt2video)#
Model Name: Qubico/hunyuan
Task Type: fast-txt2video
Speed Focus: Faster generation with fewer steps (6 steps)
Best For: Quick iterations and preview purposes
Hunyuan-img2video-concat#
Model Name: Qubico/hunyuan
Task Type: img2video-concat
Speed Focus: Faster generation with more processing steps (20 steps)
Best For: Generate videos based on images for better movement.
Hunyuan-img2video-replace#
Model Name: Qubico/hunyuan
Task Type: img2video-replace
Speed Focus: Faster generation with more processing steps (20 steps)
Best For: Generate videos following the guilding image better.
Hunyuan-txt2video-lora#
Model Name: Qubico/hunyuan
Task Type: txt2video-lora
Speed Focus: Faster generation with more processing steps (20 steps)
Best For: Generate videos based on LoRA.
Request
Body Params application/json
Video generation prompt text
Default: 16:9, options: 16:9/9:16/1:1
Image url. Must be needed when you choose img2video tasks.
lora_settings
array [object {2}]
optional{
"model": "Qubico/hunyuan",
"task_type": "txt2video",
"input": {
"prompt": "A cat walks on the grass, realistic style."
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
Request samples
curl --location --request POST 'https://api.piapi.ai/api/v1/task' \
--header 'x-api-key;' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "Qubico/hunyuan",
"task_type": "txt2video",
"input": {
"prompt": "A cat walks on the grass, realistic style."
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}'
Responses
Current status of the task
{
"code": 200,
"message": "string",
"data": {
"task_id": "736fde4d-9029-4915-8189-01353d6982cb",
"status": "string",
"output": {
"video_url": "http://example.com"
}
}
}
Modified at 2025-04-08 11:50:09