Generate lip sync from URLs
client.lipsync.generate(LipsyncGenerateParams { inputs, disable_active_speaker_detection, reference_id } body, RequestOptionsoptions?): LipsyncGenerateResponse { request_id, status }
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.
Generate lip sync from URLs
import Chamelaion from 'chamelaion';
const client = new Chamelaion({
bearerToken: process.env['CHAMELAION_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.lipsync.generate({
inputs: [
{ type: 'video', url: 'https://storage.googleapis.com/chamelaion-test-media/video.mp4' },
{ type: 'audio', url: 'https://storage.googleapis.com/chamelaion-test-media/audio.wav' },
],
reference_id: 'normal-lipsync-demo',
});
console.log(response.request_id);{
"status": "success",
"request_id": "6f82a2d8-a6d4-4e8a-a0fa-e8b09823a2d8"
}{
"error": "invalid request body"
}{
"error": "content-type must be application/json"
}{
"error": "expected exactly one video input"
}{
"error": "expected exactly one audio input"
}{
"error": "input type must be \"video\" or \"audio\""
}{
"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": "6f82a2d8-a6d4-4e8a-a0fa-e8b09823a2d8"
}{
"error": "invalid request body"
}{
"error": "content-type must be application/json"
}{
"error": "expected exactly one video input"
}{
"error": "expected exactly one audio input"
}{
"error": "input type must be \"video\" or \"audio\""
}{
"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"
}