Güçlü REST API’mizle dudak senkronlu videoları programlı olarak üretin
API kimlik doğrulama anahtarlarınızı yönetin
Kolay hatırlanacak bir ad verin (isteğe bağlı)
Giriş gerekli
API anahtarları oluşturmak ve yönetmek için giriş yapın.
Esnek ve rekabetçi planlarla başlayın
Not: API kredileri ve kullanıcı kredileri bağımsızdır, birbirine dönüştürülemez.
API isteklerinizi güvene alın
Tüm isteklerde Authorization başlığında API anahtarınızı gönderin:
Authorization: Bearer sk_XXXX_YYYY
RESTful API uç noktaları
/api/v1/lipsync-videoVideodaki sesi yenisiyle değiştir (dudak senkronu korunur)
/api/v1/lipsync-imageGörüntü + ses → tek konuşmacılı avatar videosu
/api/v1/talking-avatarGörüntü + ses + prompt -> ifade ve hareket kontrollü konuşan avatar
/api/v1/lipsync-image-multiGörüntü + çift ses → çoklu konuşmacı avatarı (sohbet/diyalog)
/api/v1/jobs/{requestId}İş durumunu sorgula ve sonucu al
Girdi, gizlilik, model kapsamı ve üretim notları
Genel API şu anda JSON içinde medya URL’leri kabul eder. Doğrudan multipart dosya yükleme ve asset-upload uç noktaları henüz yoktur. Worker’larımız ve üretim sağlayıcısı görev çalışırken erişebildiği sürece imzalı veya geçici URL’ler desteklenir.
API görevleri özel görünürlükle saklanır. Web Public anahtarı API isteklerine uygulanmaz ve şu anda bir üretimi yayınlamak için API parametresi yoktur.
İş akışını uç noktaya göre seçin: lipsync-image, lipsync-video veya lipsync-image-multi. İfade ve hareket kontrollü görüntü modeli için talking-avatar kullanın.
Bu sayfa mevcut API referansıdır. Makine tarafından okunabilir OpenAPI/Swagger belirtimi şu anda yayımlanmamıştır.
En-boy oranı, guidance scale ve audio guidance mevcut lip-sync uç noktalarında API parametresi olarak sunulmaz.
Her üretim için bir API isteği gönderin. Büyük üretim toplu işleri için giriş URL’lerini tamamlanana kadar geçerli tutun ve çok yüksek eşzamanlılık çalıştırmadan önce destekle iletişime geçin.
Tam uç nokta özellikleri
Tüm uç noktalar ortak bir yapıyı paylaşır: isteğe bağlı webhook ve modele özgü formState parametreleri.
Mevcut videodaki sesi, dudak senkronunu koruyarak yenisiyle değiştirir
webhookisteğe bağlıCallback URL’niz (HTTPS). Tamamlandığında sonucu buraya POST ederiz.
formStategerekliTüm üretim parametrelerini içeren nesne (aşağıya bakın).
videogerekliKaynak videonun genel URL’si (MP4, MOV, vb.)
audiogerekliSesin genel URL’si (MP3, WAV, vb.)
resolutiongerekli"360p", "480p", "720p", "1080p", "2k" veya "4k"
mask_imageisteğe bağlıMaske görselinin genel URL’si (lipsync alanını sınırlar)
promptisteğe bağlıStil rehberi metni
seedisteğe bağlıTekrarlanabilirlik için tam sayı tohum
Sonuçları nasıl alacağınızı seçin
Tüm API çağrıları asenkrondur. Sonuçları almak için iki seçeneğiniz vardır:
1080p, 2k ve 4k görevlerinde webhook ve polling yanıtları yalnızca nihai yükseltilmiş video sonucunu döndürür.
JSON gövdesine bir webhook URL’si ekleyin. Tamamlandığında sonucu POST ederiz.
Webhook URL’leri genel HTTPS URL’leri olmalıdır. Teslimat başarısız olursa üstel geri çekilme ile en fazla 5 kez yeniden deneriz.
webhook’u atlayın ve dönen requestId ile 5–10 sn’de bir GET /api/v1/jobs/{requestId} sorgulayın; durum "completed" olana dek.
POST /api/v1/lipsync-image
Authorization: Bearer sk_XXXX_YYYY
Content-Type: application/json
{
"webhook": "https://your-app.example.com/webhooks/lipsync",
"formState": {
"image": "https://.../face.png",
"audio": "https://.../voice.mp3",
"resolution": "720p",
"seed": 42
}
}
// Immediate Response:
{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"message": "Task submitted successfully. Use requestId to query job status."
}
// Later, when job completes, we POST to your webhook:
POST https://your-app.example.com/webhooks/lipsync
Content-Type: application/json
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"model": "lipsync-image",
"status": "completed",
"output": "https://.../result.mp4",
"error": "",
"executionTime": 12345,
"timings": null
}POST /api/v1/talking-avatar
Authorization: Bearer sk_XXXX_YYYY
Content-Type: application/json
{
"webhook": "https://your-app.example.com/webhooks/lipsync",
"formState": {
"image": "https://.../character.png",
"audio": "https://.../speech.mp3",
"prompt": "Warm presentation style, natural facial expression, subtle head motion",
"resolution": "1080p"
}
}
// Completed webhook or polling response:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"model": "talking-avatar",
"status": "completed",
"output": "https://.../result.mp4",
"error": "",
"executionTime": 12345,
"timings": null
}// Step 1: Submit job (no webhook parameter)
POST /api/v1/lipsync-image
Authorization: Bearer sk_XXXX_YYYY
Content-Type: application/json
{
"formState": {
"image": "https://.../face.png",
"audio": "https://.../voice.mp3",
"resolution": "720p"
}
}
// Immediate Response:
{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"message": "Task submitted successfully. Use requestId to query job status."
}
// Step 2: Poll for status (repeat every 5-10 seconds)
GET /api/v1/jobs/550e8400-e29b-41d4-a716-446655440000
Authorization: Bearer sk_XXXX_YYYY
// Response while processing:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"model": "lipsync-image",
"status": "processing",
"output": null,
"error": "",
"executionTime": null,
"timings": null
}
// Response when completed:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"model": "lipsync-image",
"status": "completed",
"output": "https://.../result.mp4",
"error": "",
"executionTime": 12345,
"timings": null
}
// Response if failed:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"model": "lipsync-image",
"status": "failed",
"output": null,
"error": "Generation failed. Please try again later.",
"executionTime": null,
"timings": null
}Kullanıma hazır entegrasyon örnekleri
import fetch from 'node-fetch';
import express from 'express';
const API_KEY = 'Bearer sk_XXXX_YYYY';
const BASE_URL = 'https://lipsync.studio/api/v1';
// Set up webhook server to receive results
const app = express();
app.use(express.json());
app.post('/webhooks/lipsync', (req, res) => {
const { id, status, output, error, model } = req.body;
console.log('Job update received.');
console.log('Job ID:', id);
console.log('Model:', model);
console.log('Status:', status);
if (status === 'completed') {
console.log('Video URL:', output);
} else if (status === 'failed') {
console.error('Error:', error);
}
// TODO: Save output URL to your database, send notification, etc.
res.status(200).json({ received: true });
});
app.listen(3000, () => {
console.log('Webhook server listening on port 3000');
});
// Submit job with webhook
async function submitJobWithWebhook() {
const webhookUrl = 'https://your-public-domain.com/webhooks/lipsync';
const res = await fetch(`${BASE_URL}/lipsync-image`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': API_KEY
},
body: JSON.stringify({
webhook: webhookUrl,
formState: {
image: 'https://example.com/portrait.jpg',
audio: 'https://example.com/speech.mp3',
resolution: '720p'
}
})
});
const data = await res.json();
console.log('Job submitted:', data.requestId);
console.log('Waiting for webhook callback...');
// You don't need to poll! The result will be POSTed to your webhook.
}
submitJobWithWebhook();