curl --request POST \
--url https://api.aihubmax.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "lipsync-2",
"video_url": "https://v3.fal.media/files/tiger/IugLCDJRIoGqvqTa-EJTr_3wg74vCqyNuQ-IiBd77MM_output.mp4",
"audio_url": "https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav",
"sync_mode": "loop"
}
'{
"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"
}
}Lipsync 2 Video Lip Sync
- Sync Lipsync series generates lip-synced video from video + audio input
- Asynchronous processing mode, use the returned task ID to query 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": "lipsync-2",
"video_url": "https://v3.fal.media/files/tiger/IugLCDJRIoGqvqTa-EJTr_3wg74vCqyNuQ-IiBd77MM_output.mp4",
"audio_url": "https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav",
"sync_mode": "loop"
}
'{
"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
lipsync-2: Standard quality
lipsync-2-pro: Higher quality
sync-3: Next-generation, professional quality; does not support temperature or active_speaker
"lipsync-2"
"lipsync-2-pro"
"sync-3"
Public URL of the input video file
Notes:
- Format: MP4
- Must be a publicly accessible URL
"https://v3.fal.media/files/tiger/IugLCDJRIoGqvqTa-EJTr_3wg74vCqyNuQ-IiBd77MM_output.mp4"
Public URL of the input audio file
Notes:
- Format: MP3 / WAV
- Must be a publicly accessible URL
- Audio duration directly affects output video duration and billing (depends on
sync_mode)
"https://fal.media/files/lion/vyFWygmZsIZlUO4s0nr2n.wav"
Video-audio synchronization mode, determines output video duration
Options:
bounce— Video plays back and forth to match audio length, output duration = audio durationloop— Video loops to match audio length, output duration = audio durationcut_off— Audio is trimmed when video ends, output duration = min(video, audio)silence— Video is padded with silence at the end, output duration = video durationremap— Audio timeline is remapped to match video, output duration = audio duration
"loop"
Mouth movement expressiveness control, default 0.5
Notes:
- Range:
0.0-1.0 - Only supported by
lipsync-2andlipsync-2-pro sync-3does not support this parameter
Do not pass this parameter unless necessary.
0 <= x <= 10.8
Enable active speaker detection
Notes:
- Only supported by
lipsync-2andlipsync-2-pro sync-3does not support this parameter
Do not pass this parameter unless necessary.
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 info
Show child attributes
Show child attributes
Task output type
video "video"