Create Generation

Create a lip sync generation. This is the JSON form of POST /v2/generate — provide each input by url (or by assetId from an uploaded asset). It is the same endpoint as “Create Generation with Files”; use that multipart form instead when you want to upload local files directly. Pick one content type per request.

Authentication

x-api-keystring
API Key authentication via header

Request

This endpoint expects an object.
modelenumRequired
name of the model to use for generation.
inputlist of objectsRequired

Array of input objects. Must include one video or image input item and at least one audio input item. Image inputs are only supported with the sync-3 model. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. When using segments, multiple audio inputs can be provided with unique refId values.

optionsobjectOptional
additional options available for generation.
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.
webhookUrlstringOptional
webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data.
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.
dubParamsobjectOptional

Dubbing parameters. When present, audio is extracted from the video input, dubbed via ElevenLabs into the target language, and then lipsync is run with the dubbed audio. Audio inputs in the input array are ignored when dubbing is enabled — so a single video input (with audio) is sufficient.

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.

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.
statusenum
The status of the generation.
errorstring
The error message if the generation failed.
errorCodestring

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

optionsobject
Options for the generation.
outputDurationdouble
The duration of the output media.
outputUrlstring
The URL of the output media.
outputFileNamestring
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 objects
The segments of the generation.
segmentOutputUrlstring
The URL of the segment output media.
synthesizedAudioUrlstring

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.

webhookUrlstring
The URL to the webhook endpoint.
projectIdstring
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.

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error