Sync.so Lipsync 2 Pro
Lipsync-2-Pro seamlessly synchronizes lips in videos for instant, high-quality multilingual content creation.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/sync.so-lipsync-2-pro"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "video_url": "https://segmind-resources.s3.amazonaws.com/output/a741b039-226c-43c2-9bd0-c301f058d314-UntitledVideo-ezgif.com-crop-video.mp4",
12 "audio_url": "https://segmind-resources.s3.amazonaws.com/output/80e96316-7e75-4733-b80c-049a0a6787cb-c9f17960-96b5-4119-8b7e-4ae0c9f21e2f-audio-AudioTrimmer.com-AudioTrimmer.com.mp3",
13 "sync_mode": "bounce",
14 "temperature": 0.5,
15 "auto_active_speaker_detection": false,
16 "occlusion_detection_enabled": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/sync.so-lipsync-2-pro"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "video_url": "https://segmind-resources.s3.amazonaws.com/output/a741b039-226c-43c2-9bd0-c301f058d314-UntitledVideo-ezgif.com-crop-video.mp4",
12 "audio_url": "https://segmind-resources.s3.amazonaws.com/output/80e96316-7e75-4733-b80c-049a0a6787cb-c9f17960-96b5-4119-8b7e-4ae0c9f21e2f-audio-AudioTrimmer.com-AudioTrimmer.com.mp3",
13 "sync_mode": "bounce",
14 "temperature": 0.5,
15 "auto_active_speaker_detection": false,
16 "occlusion_detection_enabled": false
17}
18
19response = requests.post(url, headers=headers, json=data)
20
21if response.status_code == 200:
22 result = response.json()
23 print(json.dumps(result, indent=2))
24else:
25 print(f"Error: {response.status_code}")
26 print(response.text)API Endpoint
https://api.segmind.com/v1/sync.so-lipsync-2-proParameters
audio_urlrequiredstring (uri)Provides the audio URL for synchronization. Use clear audio files for precision.
video_urlrequiredstring (uri)Provides the video URL for synchronization. Use high-quality links for best results.
auto_active_speaker_detectionoptionalbooleanDetects and syncs active speaker automatically. Enable for multi-speaker scenarios.
falseocclusion_detection_enabledoptionalbooleanDetects occlusion, slowing generation. Disable for faster processing.
falsesync_modeoptionalstringControls how audio and video are synchronized when their durations don't match. Default is 'bounce' for smooth looping. For detailed explanations of each option, see: https://docs.sync.so/compatibility-and-tips/media-content-tips#sync-mode-options.
"bounce""loop""bounce""cut_off""silence""remap"temperatureoptionalnumberControls expression in lip sync. Use 0.3 for calm, 0.8 for dynamic expressions.
0.5Range: 0 - 1Response Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out