語音合成
聲音克隆
對口型視頻
其他
語音合成
聲音克隆
對口型視頻
其他
創建任務
上傳視頻和音頻,創建對口型視頻任務
創建對口型任務接口
接口地址
POST /api/open/lip-sync/create
請求頭
Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN // API 密鑰
請求參數
{
"video_url": string, // 必填,視頻文件 URL(需要公網可訪問)
"audio_url": string // 必填,音頻文件 URL(需要公網可訪問)
}返回數據
// 成功響應 - 200
{
"success": true,
"message": "Task created successfully",
"data": {
"id": string, // 任務 ID
"status": string, // 任務狀態:"pending" | "processing"
"created_at": string, // 創建時間
"credits_used": number, // 消耗的積分
"remaining_credits": number // 剩餘積分
}
}
// 錯誤響應
{
"error": string // 錯誤提示信息
}CURL 示例
curl -X POST https://fishaudio.org/api/open/lip-sync/create \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"video_url": "https://example.com/video.mp4",
"audio_url": "https://example.com/audio.mp3"
}'在線調試
狀態碼說明
狀態碼說明:
200 OK - 請求成功
400 Bad Request - 請求參數錯誤
401 Unauthorized - API Token 無效
403 Forbidden - 禁止訪問
404 Not Found - 資源不存在
413 Payload Too Large - 上傳文件過大
429 Too Many Requests - 請求頻率超限/積分不足
500 Server Error - 服務器內部錯誤
錯誤響應格式:
{
"error": string, // 錯誤信息
"details": string, // 詳細錯誤信息(可選)
"code": string // 錯誤代碼(可選)
}