curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.7-reference-to-video",
"prompt": "A graceful dance performance on a moonlit stage",
"reference_image_urls": [
"https://example.com/character.jpg"
],
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "Invalid request format",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient account balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Wan2.7 Reference Video
- Wan 2.7 reference-to-video model, supporting reference images, reference videos, multi-subject, and multi-shot segmentation
- Async processing mode, use the returned task ID to query task status
- Generated video links are valid for 24 hours, please save them promptly
curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "wan-2.7-reference-to-video",
"prompt": "A graceful dance performance on a moonlit stage",
"reference_image_urls": [
"https://example.com/character.jpg"
],
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
'{
"created": 1757165031,
"id": "task-unified-1757165031-uyujaw3d",
"model": "<string>",
"object": "video.generation.task",
"progress": 0,
"status": "pending",
"task_info": {
"can_cancel": true,
"estimated_time": 45
},
"type": "video"
}{
"error": {
"message": "Invalid request format",
"type": "invalid_request_error"
}
}{
"error": {
"message": "Invalid API key",
"type": "authentication_error"
}
}{
"error": {
"message": "Insufficient account balance",
"type": "insufficient_quota"
}
}{
"error": {
"message": "Parameter validation failed",
"type": "validation_error"
}
}{
"error": {
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"message": "Internal server error",
"type": "server_error"
}
}{
"error": {
"message": "Service temporarily unavailable, please try again later",
"type": "service_unavailable"
}
}Authorizations
All APIs require Bearer Token authentication
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
wan-2.7-reference-to-video: Reference image / reference video to video
"wan-2.7-reference-to-video"
Prompt describing the desired video content to generate
5000"A graceful dance performance on a moonlit stage"
List of reference image URLs
Notes:
- Used to provide appearance references for characters or objects
- Multiple images can be provided for multi-subject scenes
["https://example.com/character.jpg"]
List of reference video URLs
Notes:
- Used to provide motion references for characters or objects
- Multiple videos can be provided for multi-subject scenes
["https://example.com/motion.mp4"]
Output video duration in seconds, supports integer values from 2-15
2 <= x <= 102
Output video resolution
Options: 720p, 1080p
720p, 1080p "720p"
Output video aspect ratio
Options: 16:9, 9:16, 1:1, 4:3, 3:4
16:9, 9:16, 1:1, 4:3, 3:4 "16:9"
Negative prompt describing content to avoid
500"blurry, jitter"
Random seed for reproducibility
0 <= x <= 2147483647123
Whether to enable multi-shot segmented generation
Notes:
- When set to
true, the system will attempt to generate multi-shot segments - Uses model default if not specified
true
Whether to enable safety checker. Uses model default if not specified
true
Response
Task created successfully
Task creation timestamp
1757165031
Task ID
"task-unified-1757165031-uyujaw3d"
Actual model name used
Specific task type
video.generation.task Task progress percentage (0-100)
0 <= x <= 1000
Task status
pending, processing, completed, failed "pending"
Asynchronous task information
Show child attributes
Show child attributes
Task output type
video "video"