Sync.so React 1 Serverless API
React-1 transforms video performances by editing actors' emotions with unmatched precision and realism.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/sync.so-react-1"
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/d4aba4f5-40fe-44fa-98bf-75d1b22e766d-react-input.mp4",
12 "audio_url": "https://segmind-resources.s3.amazonaws.com/output/487a2a38-3d3b-4e9b-8b84-eebbbd242c73-react-audio.mp3",
13 "sync_mode": "bounce",
14 "model_mode": "face",
15 "prompt": "happy",
16 "temperature": 0.5,
17 "auto_active_speaker_detection": false,
18 "occlusion_detection_enabled": false
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/sync.so-react-1"
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/d4aba4f5-40fe-44fa-98bf-75d1b22e766d-react-input.mp4",
12 "audio_url": "https://segmind-resources.s3.amazonaws.com/output/487a2a38-3d3b-4e9b-8b84-eebbbd242c73-react-audio.mp3",
13 "sync_mode": "bounce",
14 "model_mode": "face",
15 "prompt": "happy",
16 "temperature": 0.5,
17 "auto_active_speaker_detection": false,
18 "occlusion_detection_enabled": false
19}
20
21response = requests.post(url, headers=headers, json=data)
22
23if response.status_code == 200:
24 result = response.json()
25 print(json.dumps(result, indent=2))
26else:
27 print(f"Error: {response.status_code}")
28 print(response.text)API Endpoint
https://api.segmind.com/v1/sync.so-react-1Parameters
audio_urlrequiredstring (uri)URL for audio synchronization. Use clear files for precision.
video_urlrequiredstring (uri)URL for video synchronization. Use high-resolution video links.
auto_active_speaker_detectionoptionalbooleanEnable to sync with multi-speaker videos.
falsemodel_modeoptionalstringSelect the edit region. 'Face' is ideal for general use.
"face""lips""face""head"occlusion_detection_enabledoptionalbooleanDetects video occlusion. Disable for faster processing.
falsepromptoptionalstringEmotion to display on model. Use 'happy' for positive scenes.
"happy""happy""sad""angry""disgusted""surprised""neutral"sync_modeoptionalstringAudio-video sync setting. Use 'bounce' for smooth looping.
"bounce""loop""bounce""cut_off""silence""remap"temperatureoptionalnumberExpression intensity. 0.5 gives balanced 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