強力な REST API でリップシンク動画をプログラム生成
API 認証キーを管理
覚えやすい名前を付けましょう(任意)
ログインが必要です
API キーの作成と管理にはログインが必要です。
柔軟で競争力のある価格で今すぐ開始
注意:API クレジットとユーザークレジットは独立しており、相互交換はできません。
API リクエストを保護
すべてのリクエストに Authorization ヘッダーとして API キーを含めてください:
Authorization: Bearer sk_XXXX_YYYY
RESTful API エンドポイント
/api/v1/lipsync-video動画の音声を置き換え(リップシンク維持)
/api/v1/lipsync-image画像 + 音声 → 単一話者のアバター動画
/api/v1/talking-avatar画像 + 音声 + プロンプト → 表情と動きを制御できるトーキングアバター
/api/v1/lipsync-image-multi画像 + 2 音声 → 複数話者アバター(会話/対話)
/api/v1/jobs/{requestId}ジョブの状態を照会し結果を取得
入力、プライバシー、モデル範囲、本番利用の注意点
公開 API は現在 JSON 内のメディア URL を受け付けます。直接の multipart ファイルアップロードやアセットアップロード用エンドポイントはまだありません。ジョブ実行中に worker と生成プロバイダーが取得できる限り、署名付き URL や一時 URL も利用できます。
API ジョブは非公開として保存されます。Web の Public トグルは API リクエストには適用されず、生成結果を公開する API パラメータも現在ありません。
ワークフローはエンドポイントで選択します:lipsync-image、lipsync-video、lipsync-image-multi。表情と動き制御の画像モデルには talking-avatar を使用します。
このページが現在の API リファレンスです。機械可読な OpenAPI/Swagger 仕様はまだ公開されていません。
アスペクト比、guidance scale、audio guidance は現在の lip-sync エンドポイントでは API パラメータとして公開されていません。
生成ごとに 1 つの API リクエストを送信してください。大規模な本番バッチでは、完了まで入力 URL を有効に保ち、非常に高い同時実行を行う前にサポートへご連絡ください。
完全なエンドポイント仕様
すべてのエンドポイントは共通構造(任意の webhook、モデル固有の formState)を共有します。
リップシンクを維持したまま既存動画の音声を新しい音声に置換
webhook任意コールバック URL(HTTPS)。完了時に結果を POST します。
formState必須生成パラメータを含むオブジェクト(以下参照)。
video必須元動画の公開 URL(MP4、MOV など)
audio必須音声の公開 URL(MP3、WAV など)
resolution必須"360p", "480p", "720p", "1080p", "2k", または "4k"
mask_image任意マスク画像の公開 URL(マスク領域内にリップシンクを制限)
prompt任意スタイル指示のテキスト
seed任意再現性のための整数シード
結果の受け取り方法を選択
すべての API 呼び出しは非同期です。結果を取得する方法は 2 つあります:
1080p、2k、4k のジョブでは、webhook とポーリングのレスポンスは最終アップスケール済み動画のみを返します。
JSON 本文に webhook URL を指定。完了時に結果をエンドポイントへ POST します。
Webhook URL は公開 HTTPS URL である必要があります。配信に失敗した場合、指数バックオフで最大 5 回再試行します。
webhook を省略し、返却された requestId を用いて 5–10 秒ごとに GET /api/v1/jobs/{requestId} をポーリングし、status が "completed" になるまで待機します。
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
}すぐに使える統合例
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();