Live Portrait
Create lifelike talking head animations from a single image and audio input.
Try it out
Test the Live Portrait API directly in your browser with our interactive playground.
Overview
The Live Portrait API brings still images to life by generating natural head movements and lip synchronization that match the input audio.
API Reference
Endpoint
POST https://api.tryvinci.com/vincilp
Headers
Name | Type | Description |
---|---|---|
X-User-ID | string | Required. Your user ID |
Request Body
Multipart form data with:
Parameter | Type | Description |
---|---|---|
audio | File | Audio file containing speech |
image | File | Portrait image to animate |
Response
{
url: string, // URL to the generated animation
media_type: string, // "video/mp4"
user_id: string // The user ID used for the request
}
Code Examples
- Python
- JavaScript
import requests
url = "https://api.tryvinci.com/vincilp"
headers = {"X-User-ID": "your-user-id"}
files = {
"audio": open("speech.wav", "rb"),
"image": open("portrait.jpg", "rb")
}
response = requests.post(url, headers=headers, files=files)
result = response.json()
print(f"Animation URL: {result['url']}")
const formData = new FormData();
formData.append('audio', audioFile);
formData.append('image', imageFile);
const response = await fetch('https://api.tryvinci.com/vincilp', {
method: 'POST',
headers: {
'X-User-ID': 'your-user-id',
},
body: formData,
});
const result = await response.json();
console.log(`Animation URL: ${result.url}`);
Input Requirements
Image Requirements
- Format: JPG, PNG
- Resolution: 512x512 or higher
- Clear frontal face portrait
- Neutral expression recommended
Audio Requirements
- Format: WAV, MP3, M4A
- Clear speech with minimal noise
- Duration: 5-60 seconds optimal
Portrait Guidelines
- Well-lit, front-facing portrait
- Neutral background preferred
- Full face visibility
- No extreme angles
Best Practices
Image Quality
Use high-resolution portraits with good lighting.
Audio Clarity
Clean audio produces more natural animations.
Optimization
For most natural results, ensure the portrait has good lighting and a neutral expression.