curl --request POST \
--url https://api.sync.so/v2/analyze/cost \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"model": "lipsync-1.7.1",
"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,
"output_format": "mp4",
"sync_mode": "bounce",
"fps": 25,
"output_resolution": [
1280,
720
],
"active_speaker": true
},
"webhookUrl": "https://your-server.com/webhook"
}'
[
{
"estimatedFrameCount" : 123 ,
"estimatedGenerationCost" : 123
}
]
Getting started
This endpoint allows you to estimate cost by accepting identical parameters to the POST /v2/generate
endpoint. You can use this to preview the generation cost before sending/performing the actual request.
The response will include the estimated frame count and cost for the generation with the provided parameters.
name of the model to use for generation.
Available options:
lipsync-1.8.0
,
lipsync-1.8.0-beta
,
lipsync-1.7.1
,
lipsync-1.6.0
,
lipsync-1.9.0-beta
input media to use for generation. this is an array of media items.
Available options:
video
,
audio
,
text
Start and end time in seconds for each video segment to apply generation to
Start and end frames for each video segment to apply generation to
additional options available for generation.
downscale inputs for faster generations. used to preview changes.
Available options:
1
,
2
,
3
,
4
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
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.
Generations retrieved successfully
The estimated frame count for the generation.
The estimated cost of the generation in USD.