This guide explains the complete flow of integrating with the LipDub API. The process involves uploading videos, processing them, and generating dubbed content.
API Flow Overview
Step-by-Step Explanation
1. Video Upload Process
-
Initiate Upload
-
Make a
POSTrequest to/v1/videoNB: Here's the recommended video specifications to get fast results - 1080p HD, 23.976 fps, low bit-rate, H.264 Codec. The generated video will maintain the same quality and video specs as the uploaded video
-
Receive
upload_urlandvideo_id -
The API automatically creates project, scene, and actor
-
-
Upload Video
- Make a
PUTrequest to upload your video file to the providedupload_url - Call the
success_urlwhen complete or call thefailure_urlif failed - Receive a
shot_idfor tracking - To display actor pickers or previews, make a
GETrequest to/v1/shots/{shot_id}/actorsto retrieve actors for the shot. Each actor includesthumbnail_url— a short-lived, pre-signed HTTPS URL for that actor’s scene thumbnail.
- Make a
-
Monitor Processing (optional)
- Make a
GETrequest to check status using/v1/shots/{shot_id}/status - Track both video processing and AI training status
- Make a
2) Audio Upload Process
-
Initiate Audio Upload
- Make a
POSTrequest to/v1/audio - Receive
upload_urlandaudio_id
- Make a
-
Upload Audio
- Make a
PUTrequest to upload your audio file to the providedupload_url - Call the
success_urlwhen complete or call thefailure_urlif failed
- Make a
3) Generate LipDub
-
Start Generation
-
Make a
POSTrequest to/v1/shots/{shot_id}/generateNB: The generated video maintains the same video specs (resolution, frame rate, codec, colorspace, etc.) as the uploaded video. If you upload a 4K video, the output is always 4K. Outputs above HD resolution (1080p) may be more expensive than HD. If you want HD outputs via the API, you’ll need to upload and train your AI model with HD footage.
-
Include the
audio_idandoutput_filename -
Optionally specify
languageandmaintain_expression
-
-
Monitor Generation
- Make a
GETrequest to check status using/v1/shots/{shot_id}/generate/{generate_id} - Track the generation progress
- Make a
-
Download Result
- Once complete, download the result using
/v1/shots/{shot_id}/generate/{generate_id}/download - Receive a
download_urlfor the dubbed video
- Once complete, download the result using
