Skip to content

Lipsync

The Lipsync card takes a talking-head video and a speech track, then re-renders the video so the speaker’s lip movements match the audio. The speech can be an existing audio file or synthesized in the same job.

data.lip_sync_modelNotes
"gen"Default. Faster, good quality.
"sync.so"Higher quality, slower processing.

POST /v1/vidsheet/{id}/cells/{cell_id}/generate?agent_id={agent_id}
FieldTypeRequiredDescription
generation_typestringYes"lipsync".
data.talking_avatar_video_data.video.valuestring (URI)YesPublic URL of the source video.
data.talking_avatar_video_data.audio.valuestring (URI)One ofPublic URL of the speech audio.
data.voice_generation_dataobjectOne ofSynthesize the speech in this job — same shape as Speech from Text data (text, voice_id, …).
data.lip_sync_modelstringNo"gen" (default) or "sync.so".
data.remove_backgroundbooleanNoRemove the video background. Default false.
data.remove_silencebooleanNoTrim silence from synthesized speech. Default false.

Exactly one of audio.value or voice_generation_data must be supplied. No other top-level fields are accepted.

Terminal window
curl -X POST "https://api.gen.pro/v1/vidsheet/101/cells/3000/generate?agent_id=42" \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"generation_type": "lipsync",
"data": {
"talking_avatar_video_data": {
"video": { "value": "https://cdn.gen.pro/uploads/talking-head.mp4" },
"audio": { "value": "https://cdn.gen.pro/outputs/voiceover-abc123.mp3" }
},
"lip_sync_model": "gen"
}
}'

You can also generate on a layer within the cell:

POST /v1/vidsheet/{id}/cells/{cell_id}/layers/{layer_id}/generate?agent_id={agent_id}

The request body is identical.


Poll Check generation status until complete. The finished generation returns the lip-synced video in output_resources.

{
"id": 9002,
"status": "completed",
"output_resources": [
{
"id": 1502,
"url": "https://cdn.gen.pro/outputs/lipsynced-def456.mp4",
"object_type": "video",
"type": "output"
}
]
}
StatusError codeDescription
422validation_errorMissing video.value, or neither audio.value nor voice_generation_data supplied.
404not_foundSheet, cell, or layer not found.

FieldTypeDescription
lipSyncModelstringDefault model: "gen" or "sync.so".
autoGeneratebooleanAuto-trigger generation when source video/audio changes.