Lipsync
The Lipsync card takes a video and an audio track, then re-renders the video so the speaker’s lip movements match the audio. Two models are available with different quality/speed tradeoffs.
Models
Section titled “Models”| Model | generation_type | data.model | Notes |
|---|---|---|---|
| Sync | lipsync | "sync_so" | Higher quality, slower processing. |
| GEN | lipsync | "gen" | Faster, good quality. |
Generate lipsync
Section titled “Generate lipsync”Lipsync is typically applied to a layer within a cell, not the cell itself, since it composites audio onto an existing video layer.
POST /v1/autocontentengine/{id}/cells/{cell_id}/layers/{layer_id}/generate?agent_id={agent_id}Path parameters
Section titled “Path parameters”| Parameter | Type | Description |
|---|---|---|
id | integer | The sheet ID. |
cell_id | integer | The cell ID. |
layer_id | integer | The layer ID. |
Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
generation_type | string | Yes | "lipsync". |
data.video_resource_id | string | Yes | Source video content resource ID. |
data.audio_resource_id | string | Yes | Source audio content resource ID. |
data.model | string | Yes | "sync_so" or "gen". |
Example
Section titled “Example”curl -X POST "https://api.gen.pro/v1/autocontentengine/101/cells/3000/layers/4000/generate?agent_id=42" \ -H "X-API-Key: your-api-key" \ -H "Content-Type: application/json" \ -d '{ "generation_type": "lipsync", "data": { "model": "sync_so", "video_resource_id": "video_res_123", "audio_resource_id": "audio_res_456" } }'You can also generate on the cell directly if it holds the video:
POST /v1/autocontentengine/{id}/cells/{cell_id}/generate?agent_id={agent_id}The request body is identical.
Response
Section titled “Response”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" } ]}Errors
Section titled “Errors”| Status | Error code | Description |
|---|---|---|
422 | validation_error | Missing or invalid video/audio resource. |
404 | not_found | Sheet, cell, or layer not found. |
Cell configuration
Section titled “Cell configuration”| Field | Type | Description |
|---|---|---|
lipSyncModel | string | Default model: "sync_so" or "gen". |
autoGenerate | boolean | Auto-trigger generation when source video/audio changes. |