Skip to content
Developer Portal

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.

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.

Terminal window
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"
Terminal window
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:

Terminal window
curl -X GET 'https://api.pruna.ai/v1/predictions/status/1zww7deyssrme0csqwr90phzzr' \
-H 'apikey: YOUR_API_KEY'

Add -H 'Try-Sync: true' to wait up to 60 seconds for the video. If it is not ready by then, poll get_url.

ParameterTypeDescription
videostringVideo 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)
audiostringThe new speech. The output is as long as the shorter of the video and the audio, up to 60 seconds, at 24 fps
ParameterTypeDefaultDescription
seedintegerrandomRandom seed for reproducible generation
enable_safety_filterbooleanfalseTurn the safety filter on or off; see Blocked requests.

A video in which no face is found fails and is not billed.

Content moderation can block a request; see Blocked requests. On this model, enable_safety_filter=false lifts a safety-filter block.