POST
/
v2
/
analyze
/
cost
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.

Authorizations

x-api-key
string
header
required

Body

application/json
model
enum<string>
default:
loop
required

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
object[]
required

input media to use for generation. this is an array of media items.

options
object

additional options available for generation.

webhookUrl
string

webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.

Response

200
application/json
Generations retrieved successfully
estimatedFrameCount
number
required

The estimated frame count for the generation.

estimatedGenerationCost
number
required

The estimated cost of the generation in USD.