# Lipsync ## Generate lip sync from URLs **post** `/v1/lipsync/generate` Starts a lip sync job from exactly one remote video URL and one remote audio URL. The response includes a request identifier to poll later. ### Body Parameters - `inputs: array of object { type, url }` Exactly one video input and one audio input (order does not matter). - `type: "video" or "audio"` Type of input media. - `"video"` - `"audio"` - `url: string` URL of the media resource. - `disable_active_speaker_detection: optional boolean` Disable active speaker detection and use max-face lipsync preprocessing. - `reference_id: optional string` Optional client-provided identifier for later retrieval. ### Returns - `LipsyncGenerate = object { request_id, status }` - `request_id: string` Identifier of the created lip sync request. - `status: "success"` Current state of the newly created request. - `"success"` ### Example ```http curl https://api.chamelaion.com/api/v1/lipsync/generate \ -H 'Content-Type: application/json' \ -H "x-api-key: $CHAMELAION_API_KEY" \ -d '{ "inputs": [ { "type": "video", "url": "https://cdn.example.com/episodes/42.mp4" }, { "type": "audio", "url": "https://cdn.example.com/dubs/42-japanese.wav" } ] }' ``` #### Response ```json { "status": "success", "request_id": "6f82a2d8-a6d4-4e8a-a0fa-e8b09823a2d8" } ``` ## Generate lip sync from uploaded media **post** `/v1/lipsync/generate-with-media` Starts a lip sync job by uploading one video file and one audio file as multipart form-data. ### Returns - `LipsyncGenerate = object { request_id, status }` - `request_id: string` Identifier of the created lip sync request. - `status: "success"` Current state of the newly created request. - `"success"` ### Example ```http curl https://api.chamelaion.com/api/v1/lipsync/generate-with-media \ -H 'Content-Type: multipart/form-data' \ -H "x-api-key: $CHAMELAION_API_KEY" \ -F 'audio=@/path/to/audio' \ -F 'video=@/path/to/video' ``` #### Response ```json { "status": "success", "request_id": "3b7df3e8-f578-44de-b4f5-5f58dd6b89e0" } ``` ## Domain Types ### Lipsync Generate - `LipsyncGenerate = object { request_id, status }` - `request_id: string` Identifier of the created lip sync request. - `status: "success"` Current state of the newly created request. - `"success"` # Requests ## Get lip sync request **get** `/v1/lipsync/requests/{id}` Returns a single lip sync request by request UUID or `reference_id`. ### Path Parameters - `id: string` ### Returns - `LipsyncRequest = object { id, created_at, status, 5 more }` - `id: string` Lip sync request ID. - `created_at: string` Request creation time in UTC. - `status: string` Current request status. - `error_message: optional string` Failure message when status is `failed`. - `finished_at: optional string` Request processing completion time in UTC. - `output_url: optional string` URL to the generated output media, when available. - `reference_id: optional string` Client-provided identifier for this request. - `started_at: optional string` Request processing start time in UTC. ### Example ```http curl https://api.chamelaion.com/api/v1/lipsync/requests/$ID \ -H "x-api-key: $CHAMELAION_API_KEY" ``` #### Response ```json { "id": "6f82a2d8-a6d4-4e8a-a0fa-e8b09823a2d8", "reference_id": "dub-episode-42", "status": "completed", "created_at": "2026-04-07T10:00:00Z", "started_at": "2026-04-07T10:00:05Z", "finished_at": "2026-04-07T10:01:30Z", "output_url": "https://storage.chamelaion.com/output/6f82a2d8.mp4" } ``` ## List lip sync requests **get** `/v1/lipsync/requests` Returns a paginated list of lip sync requests for the authenticated account. ### Query Parameters - `limit: optional number` Maximum number of items to return. - `offset: optional number` Number of items to skip before returning results. - `reference_id: optional string` Filter requests by exact `reference_id`. ### Returns - `data: array of LipsyncRequest` - `id: string` Lip sync request ID. - `created_at: string` Request creation time in UTC. - `status: string` Current request status. - `error_message: optional string` Failure message when status is `failed`. - `finished_at: optional string` Request processing completion time in UTC. - `output_url: optional string` URL to the generated output media, when available. - `reference_id: optional string` Client-provided identifier for this request. - `started_at: optional string` Request processing start time in UTC. - `pagination: object { limit, offset, total }` - `limit: number` Applied page size. - `offset: number` Applied result offset. - `total: number` Total number of matching records. ### Example ```http curl https://api.chamelaion.com/api/v1/lipsync/requests \ -H "x-api-key: $CHAMELAION_API_KEY" ``` #### Response ```json { "data": [ { "id": "6f82a2d8-a6d4-4e8a-a0fa-e8b09823a2d8", "reference_id": "batch-2026-04", "status": "completed", "created_at": "2026-03-30T11:00:00Z", "started_at": "2026-03-30T11:00:04Z", "finished_at": "2026-03-30T11:01:09Z", "output_url": "https://storage.chamelaion.com/output/6f82a2d8.mp4" }, { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "reference_id": "batch-2026-04", "status": "queued", "created_at": "2026-03-30T11:02:00Z" } ], "pagination": { "limit": 20, "offset": 0, "total": 2 } } ``` ## Domain Types ### Lipsync Request - `LipsyncRequest = object { id, created_at, status, 5 more }` - `id: string` Lip sync request ID. - `created_at: string` Request creation time in UTC. - `status: string` Current request status. - `error_message: optional string` Failure message when status is `failed`. - `finished_at: optional string` Request processing completion time in UTC. - `output_url: optional string` URL to the generated output media, when available. - `reference_id: optional string` Client-provided identifier for this request. - `started_at: optional string` Request processing start time in UTC.