p-video-2-pro-lipsync
Lip-sync a video to new speech
p-video-2-pro-lipsync re-renders the mouth of the person in a video so it matches new speech, for dubbing and voice-overs. Provide a video of the person speaking and the new audio. The output is a 24 fps MP4 as long as the shorter of the video and the audio, up to 60 seconds.
Rate Limit: 50 requests per minute
Category: Video Generation
Price: $0.025 per second of output video, at every resolution
A 10 second video is $0.25 and a 60 second video is $1.50. Part seconds are rounded up (a 10.2 second video is billed as 11 seconds), with a minimum of 1 second.
Output resolution
Section titled “Output resolution”The output keeps the input video's resolution and aspect ratio, up to 1080p (1920 px on the long side). Larger videos are scaled down to that. The price is the same at every resolution.
Quickstart
Section titled “Quickstart”Upload the video and the audio
Section titled “Upload the video and the audio”curl -X POST "https://api.pruna.ai/v1/files" \ -H "apikey: YOUR_API_KEY" \ -F "content=@/path/to/video.mp4"
curl -X POST "https://api.pruna.ai/v1/files" \ -H "apikey: YOUR_API_KEY" \ -F "content=@/path/to/speech.wav"Asynchronous Request (Default)
Section titled “Asynchronous Request (Default)”curl -X POST 'https://api.pruna.ai/v1/predictions' \ -H 'Content-Type: application/json' \ -H 'apikey: YOUR_API_KEY' \ -H 'Model: p-video-2-pro-lipsync' \ -d '{ "input": { "video": "https://api.pruna.ai/v1/files/YOUR_VIDEO_ID", "audio": "https://api.pruna.ai/v1/files/YOUR_AUDIO_ID" } }'Response:
{ "id": "1zww7deyssrme0csqwr90phzzr", "model": "p-video-2-pro-lipsync", "input": { ... }, "get_url": "https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr"}Check status and get results:
curl -X GET 'https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr' \ -H 'apikey: YOUR_API_KEY'Synchronous Request (Try-Sync)
Section titled “Synchronous Request (Try-Sync)”Add -H 'Try-Sync: true' to wait up to 60 seconds for the video. If it is not ready by then, poll get_url.
Parameters
Section titled “Parameters”Required
Section titled “Required”| Parameter | Type | Description |
|---|---|---|
| video | string | Video of the person who speaks, with the face visible. Up to 200 MB. The output keeps its resolution and aspect ratio, up to 1080p (1920 px on the long side) |
| audio | string | The new speech. The output is as long as the shorter of the video and the audio, up to 60 seconds, at 24 fps |
Optional
Section titled “Optional”| Parameter | Type | Default | Description |
|---|---|---|---|
| seed | integer | random | Random seed for reproducible generation |
| enable_safety_filter | boolean | false | Turn the safety filter on or off; see Blocked requests. |
A video in which no face is found fails and is not billed.
Blocked requests
Section titled “Blocked requests”Content moderation can block a request; see Blocked requests. On this model, enable_safety_filter=false lifts a safety-filter block.