curl --request POST \
--url https://api.sync.so/v2/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"model": "lipsync-1.9.0-beta",
"input": [
{
"type": "video",
"url": "https://synchlabs-public.s3.us-west-2.amazonaws.com/david_demo_shortvid-03a10044-7741-4cfc-816a-5bccd392d1ee.mp4"
},
{
"type": "audio",
"url": "https://synchlabs-public.s3.us-west-2.amazonaws.com/david_demo_shortaud-27623a4f-edab-4c6a-8383-871b18961a4a.wav"
}
],
"options": {
"pads": [
0,
5,
0,
0
],
"speedup": 1,
"temperature": 0.5,
"output_format": "mp4",
"sync_mode": "bounce",
"fps": 25,
"output_resolution": [
1280,
720
],
"active_speaker": true
},
"webhookUrl": "https://your-server.com/webhook"
}'
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": "PENDING",
"model": "<string>",
"input": [
{
"type": "<string>",
"url": "<string>"
}
],
"webhookUrl": {},
"options": {},
"outputUrl": {},
"outputDuration": {},
"error": "<string>"
}
Generation Status Updates
There are two ways to monitor
Input for creating generation job
name of the model to use for generation.
Available options:
lipsync-2
,
lipsync-1.9.0-beta
,
lipsync-1.8.0
,
lipsync-1.7.1
,
lipsync-1.6.0
Array of input objects. Must include one video input and either an audio or text input.
Example:"https://synchlabs-public.s3.us-west-2.amazonaws.com/david_demo_shortvid-03a10044-7741-4cfc-816a-5bccd392d1ee.mp4"
Start and end time in seconds for each video segment to apply generation to
First number is start time, second number is end time
Start and end frames for each video segment to apply generation to
First number is start frame, second number is end frame
Example:[
{
"type": "video",
"url": "https://synchlabs-public.s3.us-west-2.amazonaws.com/david_demo_shortvid-03a10044-7741-4cfc-816a-5bccd392d1ee.mp4"
},
{
"type": "audio",
"url": "https://synchlabs-public.s3.us-west-2.amazonaws.com/david_demo_shortaud-27623a4f-edab-4c6a-8383-871b18961a4a.wav"
}
]
additional options available for generation.
downscale inputs for faster generations. used to preview changes.
Available options:
1
,
2
,
3
,
4
generation temperature randomness between 0 and 1. note: only works for lipsync-2 based models.
format of the output media that is generated.
Available options:
mp4
,
mov
lipsync mode when audio and video durations are out of sync.
Available options:
loop
,
bounce
,
cut_off
,
silence
,
remap
Frames per second (FPS) for the output video
options.output_resolution
Resolution of the output video [width, height]
Whether to detect active speaker and apply generation to them
webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
Example:"https://your-server.com/webhook"
A unique identifier for the generation.
The date and time the generation was created.
The status of the generation.
Available options:
PENDING
,
PROCESSING
,
COMPLETED
,
FAILED
,
REJECTED
,
CANCELED
,
TIMED_OUT
The name of the model used for generation.
An array of input objects containing type and URL.
The URL to the webhook endpoint.
Options for the generation.
The URL of the output media.
The duration of the output media.
The error message if the generation failed.