For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportStatusTry now
DocumentationAPI Reference
DocumentationAPI Reference
    • API Overview
  • API Guides
    • Authentication
    • Concurrency & Rate Limits
    • Batch Processing
    • Webhooks
  • Generate API
    • POSTCreate Generation
    • POSTCreate Generation with Files
    • GETGet Generation
    • GETList Generations
    • POSTEstimate Cost
  • Batch API
    • POSTCreate Batch
    • GETGet Batch
    • GETList Batches
  • Assets API
    • GETList Assets
    • GETGet Asset
  • Models API
    • GETList Models
  • Webhooks Payload Reference
LogoLogo
SupportStatusTry now
Generate API

Create Generation with Files

POST
/v2/generate
POST
/v2/generate
$curl -X POST https://api.sync.so/v2/generate \
> -H "x-api-key: <apiKey>" \
> -H "Content-Type: multipart/form-data" \
> -F video=@<file1> \
> -F audio=@<file1> \
> -F model="lipsync-2"
1{
2 "createdAt": "2024-01-15T09:30:00Z",
3 "id": "id",
4 "input": [
5 {
6 "type": "video",
7 "url": "https://assets.sync.so/docs/example-video.mp4"
8 },
9 {
10 "type": "audio",
11 "url": "https://assets.sync.so/docs/example-audio.wav"
12 }
13 ],
14 "model": "lipsync-2",
15 "status": "PENDING",
16 "error": "error",
17 "options": {
18 "sync_mode": "loop"
19 },
20 "outputDuration": 10.5,
21 "outputUrl": "",
22 "webhookUrl": ""
23}
Was this page helpful?
Previous

Get Generation

Next
Built with

Authentication

x-api-keystring
API Key authentication via header

Request

Use content type multipart/form-data to use local files to create a generation. Only files below 20MB are supported. For larger files, use input field to provide urls for the corresponding input items. Combining both file and url inputs is also supported, with the file taking precedence over the url.

videofileOptional
Input video file.
audiofileOptional
Input audio file.
modelenumRequired
name of the model to use for generation.
Allowed values:
inputlist of objectsOptional

Array of input objects. Can be used to provide urls for larger files. Each input should either have a file or a url. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration.

optionsobjectOptional
webhookUrlstringOptional

Response

Job created successfully
createdAtdatetime
The date and time the generation was created.
idstring
A unique identifier for the generation.
inputlist of objects
An array of input objects used for generation.
modelenum
The name of the model used for generation.
Allowed values:
statusenum
The status of the generation.
Allowed values:
errorstring
The error message if the generation failed.
error_codestring
The error code if the generation failed.
optionsobject
Options for the generation.
outputDurationdouble
The duration of the output media.
outputUrlstring
The URL of the output media.
segmentslist of objects
The segments of the generation.
segmentOutputUrlstring
The URL of the segment output media.
webhookUrlstring
The URL to the webhook endpoint.

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error