API Documentation

Complete guide to integrating with the LipSync.dev API for generating lip-synced videos.

Getting Started

Authentication

All API requests require authentication using your API key. Include your key in the request headers:

// Headers
Authorization: Bearer your_api_key_here
Content-Type: application/json

Alternative API Endpoints

POST/api/async/lipsync

Alternative endpoint format for generating lip-sync videos with standard industry response format.

Request Body

{
  "srcVideoUrl": "https://example.com/video.mp4",
  "audioUrl": "https://example.com/audio.mp3",
  "videoParams": {
    "video_width": 0,
    "video_height": 0,
    "video_enhance": 1,
    "fps": "25"
  },
  "vocalAudioUrl": "https://example.com/vocal.mp3"
}

Response

{
  "code": 0,
  "message": "success",
  "data": {
    "taskId": "b08337dc08d7428daa64b3d5e61b8350"
  }
}
POST/api/getAsyncResult

Check job status and get results using task ID from the async endpoint.

Request Body

{
  "taskId": "b08337dc08d7428daa64b3d5e61b8350"
}

Response

{
  "code": 0,
  "message": "success",
  "data": {
    "task": {
      "taskId": "b08337dc08d7428daa64b3d5e61b8350",
      "status": 3,
      "reason": "",
      "taskType": "lipsync"
    },
    "videos": [{
      "videoUrl": "https://example.com/result.mp4",
      "videoType": "mp4"
    }]
  }
}

Primary API Endpoints

POST/api/v1/lipsync/submit

Request Body

{
  "srcVideoUrl": "https://example.com/video.mp4",
  "audioUrl": "https://example.com/audio.mp3",
  "videoParams": {
    "video_width": 0,      // 0 = keep original
    "video_height": 0,     // 0 = keep original
    "video_enhance": 1,    // 0 or 1
    "fps": "25"           // optional: "25" or "original"
  },
  "vocalAudioUrl": "https://example.com/vocal.mp3" // optional
}

Parameters

srcVideoUrlrequired

URL of the source video file

audioUrlrequired

URL of the audio file for lip syncing

videoParamsrequired

Video processing parameters (width, height, enhance, fps)

Response

{
  "jobId": 123,
  "status": "processing",
  "estimatedCredits": 38,
  "createdAt": "2025-07-24T12:00:00Z"
}

Check Job Status

GET/api/v1/lipsync/status/:jobId

Response

{
  "jobId": 123,
  "status": "completed",  // "processing", "completed", or "failed"
  "createdAt": "2025-07-24T12:00:00Z",
  "outputUrl": "https://example.com/output.mp4",
  "creditsUsed": 38,
  "errorMessage": null
}

Status Values

pendingJob is queued for processing
processingJob is currently being processed
completedJob completed successfully
failedJob failed with error

Usage Statistics

GET/api/v1/usage

Response

{
  "current_period": {
    "start_date": "2024-01-01",
    "end_date": "2024-01-31",
    "requests_used": 250,
    "requests_limit": 1000
  },
  "total_requests": 1580
}

Rate Limits

60
Requests per minute
Free Plan
300
Requests per minute
Pro Plan
1000
Requests per minute
Enterprise Plan

Code Examples

JavaScript/Node.js

const response = await fetch('https://api.lipsync.dev/v1/lipsync/submit', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'your_api_key_here'
  },
  body: JSON.stringify({
    srcVideoUrl: 'https://example.com/video.mp4',
    audioUrl: 'https://example.com/audio.mp3',
    videoParams: {
      video_width: 0,
      video_height: 0,
      video_enhance: 1,
      fps: '25'
    }
  })
});

const data = await response.json();
console.log(data.jobId);

Python

import requests

response = requests.post('https://api.lipsync.dev/v1/generate', 
  headers={
    'Content-Type': 'application/json',
    'X-API-Key': 'your_api_key_here'
  },
  json={
    'image_url': 'https://example.com/person.jpg',
    'script': 'Hello world!',
    'voice_id': 'voice_english_female_01'
  }
)

data = response.json()
print(data['job_id'])

cURL

curl -X POST https://api.lipsync.dev/v1/generate \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "image_url": "https://example.com/person.jpg",
    "script": "Hello world!",
    "voice_id": "voice_english_female_01"
  }'

Need Help?

Can't find what you're looking for? Our support team is here to help.

Get Started Today