Skip to navigation

Create Generation

Start a lipsync generation. Pass each media input by url or by the assetId of an uploaded asset. To send local files in the request itself, use Create Generation with Files.

A new generation starts as PENDING. Poll Get Generation or set webhookUrl to find out when it finishes.

Send an Idempotency-Key header and reuse it, with the same payload, when you retry. A retry then returns the original generation instead of creating a second one. Keys are kept for seven days, and a retry after the original ended FAILED or REJECTED starts a new generation (201). See Idempotent Requests. Error codes are explained in Error Handling; those for social video links and dialogue edits are in their guides.

Authentication

x-api-keystring
API Key authentication via header

Headers

Idempotency-KeystringOptional

Case-sensitive organization-scoped key, 1–128 characters matching [A-Za-z0-9._~-]+. Send exactly one header. Reuse the same key and payload for retries of one action; a retry after the generation ended FAILED or REJECTED starts a new one. Use a unique key per intended generation. Retained seven days from acceptance, longer while active or unresolved. Not a JSON field.

Request

This endpoint expects an object.
inputlist of objectsRequired

One video or image input plus one audio or text input. With dubParams, send exactly one video input and nothing else; the audio to dub comes from that video. Image inputs are sync-3 only. With segments, give each audio or text input that a segment references a unique refId. At most 102 inputs.

modelenumRequired
name of the model to use for generation.
Allowed values:
dialogueEditobjectOptional

The id of a completed dialogue edit from POST /v2/dialogue-edits, which supplies the audio and edited regions. The edit’s preview must have run segment lipsync and section expansion (segmentLipsyncEnabled and sectionExpansionEnabled). Send one video input, the video the edit was made from, and no audio, segments or dubParams. See Dialogue Editing.

dubParamsobjectOptional

Dubbing parameters. When present, audio is extracted from the single video input, dubbed via ElevenLabs into the target language, and then lipsync is run with the dubbed audio. Do not include audio or text inputs with dubParams; requests that send both are rejected.

optionsobjectOptional
additional options available for generation.
outputAudioobjectOptional
An audio input that replaces the sound of the whole finished output, lipsynced parts or not. Use it with segments, for example one dubbed track over a video where some segments set lipsync to false. If a segment sets lipsync to false and this is omitted, the only audio input is used. Not available with a custom output bucket, zero data retention or a retention override.
outputFileNamestringOptional
Base filename for the generated output without extension. The .mp4 extension will be added automatically. Only alphanumeric characters, underscores, and hyphens are allowed, up to 255 characters.
projectIdstringOptional

Optionally attach this generation to a project (created via POST /v2/projects) so it appears in Studio under that project. Must reference a project in your organization — otherwise the request is rejected with 422.

segmentslist of objectsOptional
segments definition list. When provided, allows defining one or more video segments with different audio inputs for each segment. Each segment specifies a time range and references an audio input by refId. At most 100 segments.
webhookUrlstringOptional

Webhook URL for generation status updates. When the generation reaches a terminal state, Sync sends a POST request with the generation payload and a Sync-Signature header. Verify the header with the organization webhook secret from GET /v2/organizations/webhook/secret. HTTPS is strongly recommended.

Response

First acceptance returns 201, as does a keyed retry that starts a new generation after the original ended FAILED or REJECTED. An equivalent keyed replay of an active or completed generation returns 200 with this same response shape and Idempotency-Replayed: true.

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.
errorstringOptional

The error message if the generation failed, was rejected or lip-synced nothing (NO_OP).

errorCodestringOptional

Stable, machine-readable error code if the generation failed, was rejected or lip-synced nothing (NO_OP) (e.g. generation_input_video_inaccessible). The full catalog of codes, messages and suggested fixes is served unauthenticated at GET /v2/errors.

optionsobjectOptional
Options for the generation.
outputDurationdoubleOptional
The duration of the output media.
outputUrlstringOptional
The URL of the output media.
outputFileNamestringOptional
The sanitized filename applied to the output media. Characters outside letters, numbers, dashes and underscores are stripped and spaces become underscores, so this can differ from the value submitted. Null when no name was provided.
segmentslist of objectsOptional
The segments of the generation.
segmentOutputUrlstringOptional
The URL of the segment output media.
dubAudioUrlstring or nullOptional

Dubbed audio URL. Omitted for generations without dubParams; null until the dubbed track is available.

dubAudioAssetIdstring or nullOptional

Reusable AUDIO asset for the dubbed track. Omitted without dubParams; null until available, or when retention settings or a custom output bucket prevent saving an asset.

synthesizedAudioUrlstringOptional

The URL of the audio synthesized from a text (TTS) input. Only present for generations created with a TTS text input; reuse it as an audio input to keep the same take across generations.

webhookUrlstringOptional
The URL to the webhook endpoint.
projectIdstringOptional
The id of the project this generation is attached to, or null when it belongs to no project. Set via the projectId field on the create request.
generationEstimateobjectOptional

Finish-time estimate recorded when the generation was accepted. Only set for generations made in sync’s own apps, such as Studio. For any generation, request include=progress and read progress.estimatedFinishAt.

progressobjectOptional

Render progress and expected finish. Only included when the generation is requested with include=progress.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
410
Generation Deleted Error
422
Unprocessable Entity Error
429
Generation Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error
504
Gateway Timeout Error