Hunyuan Video Generation
Advanced video generation model supporting multiple task types including text-to-video, image-to-video, and LoRA-enhanced generation.
Base URL
https://api.qubico.ai/v1/inference
Header Params
x-api-key: YOUR_API_KEY
Model ID
Qubico/hunyuan
Required Parameters
model
Model identifier. Must be "Qubico/hunyuan"
task_type
Task type. Options: "txt2video"
, "fast-txt2video"
, "img2video-concat"
, "img2video-replace"
, "txt2video-lora"
input.prompt
Text description of the video content to generate. Maximum 1000 characters. Required for all task types.
Optional Parameters
input.image
Source image URL for image-to-video generation. Required for img2video-concat
and img2video-replace
tasks. Supports JPEG, PNG, WebP formats.
input.lora_settings
LoRA configuration array for txt2video-lora
task. Each object contains lora_type
and lora_strength
(0.0-2.0).
input.aspect_ratio
Video aspect ratio. Common values: "16:9"
, "9:16"
, "1:1"
, "4:3"
. Default varies by task type.
Configuration Parameters
config.webhook_config
Webhook configuration for async notifications
endpoint
- Webhook URLsecret
- Webhook secret for verificationCode Examples
txt2video
{
"model": "Qubico/hunyuan",
"task_type": "txt2video",
"input": {
"prompt": "A cat walks on the grass, realistic style."
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
fast-txt2video
{
"model": "Qubico/hunyuan",
"task_type": "fast-txt2video",
"input": {
"prompt": "A cat walks on the grass, realistic style."
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
img2video-concat
{
"model": "Qubico/hunyuan",
"task_type": "img2video-concat",
"input": {
"image": "https://i.ibb.co/5g8hj28f/hug.webp",
"prompt": "Describe a heartfelt scenario where one person expresses affection through warm embrace to the other, highlighting the emotional warmth and intimacy shared in that moment.",
"aspect_ratio": "1:1"
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
img2video-replace
{
"model": "Qubico/hunyuan",
"task_type": "img2video-replace",
"input": {
"image": "https://i.ibb.co/5g8hj28f/hug.webp",
"prompt": "Describe a heartfelt scenario where one person expresses affection through warm embrace to the other, highlighting the emotional warmth and intimacy shared in that moment.",
"aspect_ratio": "1:1"
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
txt2video-lora
{
"model": "Qubico/hunyuan",
"task_type": "txt2video-lora",
"input": {
"prompt": "A cat walks on the grass, anime style.",
"lora_settings": [
{
"lora_type": "anime",
"lora_strength": 1.0
}
]
},
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
}
}
Response Format
{
"task_id": "string",
"status": "pending|processing|completed|failed",
"result": {
"video_url": "string",
"duration": "number",
"resolution": "string",
"format": "mp4"
},
"created_at": "timestamp",
"completed_at": "timestamp"
}
Error Handling
Common Error Codes
400
- Invalid parameters or malformed request401
- Invalid or missing API key429
- Rate limit exceeded500
- Internal server error
Rate Limits & Pricing
- • 10 requests per minute
- • 100 requests per hour
- • 1000 requests per day
- • Standard: $0.30 per second
- • Fast: $0.20 per second
- • Image-to-Video: $0.35 per second
- • LoRA: $0.40 per second