Generate lip sync from uploaded media
client.lipsync.generateWithMedia(LipsyncGenerateWithMediaParams { audio, video, disable_active_speaker_detection, 2 more } body, RequestOptionsoptions?): LipsyncGenerate { request_id, status }
POST/v1/lipsync/generate-with-media
Starts a lip sync job by uploading one video file and one audio file as multipart form-data.
Generate lip sync from uploaded media
import Chamelaion from 'chamelaion';
const client = new Chamelaion({
apiKey: process.env['CHAMELAION_API_KEY'], // This is the default and can be omitted
});
const lipsyncGenerate = await client.lipsync.generateWithMedia({
audio: fs.createReadStream('path/to/file'),
video: fs.createReadStream('path/to/file'),
model: 'lipsync-2',
reference_id: 'upload-demo-01',
});
console.log(lipsyncGenerate.request_id);{
"status": "success",
"request_id": "3b7df3e8-f578-44de-b4f5-5f58dd6b89e0"
}{
"error": "content-type must be multipart/form-data"
}{
"error": "video file is required"
}{
"error": "audio file is required"
}{
"error": "model must be \"lipsync-2\""
}{
"error": "missing authorization header"
}{
"error": "invalid authorization format"
}{
"error": "missing token"
}{
"error": "invalid token"
}{
"error": "unauthorized"
}{
"error": "token limit reached"
}{
"error": "rate limit exceeded"
}{
"error": "internal error"
}Returns Examples
{
"status": "success",
"request_id": "3b7df3e8-f578-44de-b4f5-5f58dd6b89e0"
}{
"error": "content-type must be multipart/form-data"
}{
"error": "video file is required"
}{
"error": "audio file is required"
}{
"error": "model must be \"lipsync-2\""
}{
"error": "missing authorization header"
}{
"error": "invalid authorization format"
}{
"error": "missing token"
}{
"error": "invalid token"
}{
"error": "unauthorized"
}{
"error": "token limit reached"
}{
"error": "rate limit exceeded"
}{
"error": "internal error"
}