跳转到主要内容
POST
/
v1
/
videos
/
generations
Lipsync 2
curl --request POST \
  --url https://api.foxapi.cc/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "lipsync-2",
  "video_url": "https://example.com/portrait-video.mp4",
  "audio_url": "https://example.com/speech.mp3",
  "sync_mode": "loop"
}
'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "<string>",
  "object": "video.generation.task",
  "progress": 0,
  "status": "pending",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "video"
}

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
enum<string>
默认值:lipsync-2
必填

Lipsync 模型变体

  • lipsync-2:标准质量
  • lipsync-2-pro:更高质量
可用选项:
lipsync-2
示例:

"lipsync-2"

video_url
string
必填

输入视频文件的公开 URL

说明:

  • 格式:MP4
  • 必须为公开可访问的 URL
示例:

"https://example.com/portrait-video.mp4"

audio_url
string
必填

输入音频文件的公开 URL

说明:

  • 格式:MP3 / WAV
  • 必须为公开可访问的 URL
  • 音频时长直接影响输出视频时长和计费(取决于 sync_mode
示例:

"https://example.com/speech.mp3"

sync_mode
string
默认值:loop

视频与音频的同步模式,决定输出视频时长

可选值:

行为输出时长
bounce视频来回播放以匹配音频长度= 音频时长
loop视频循环播放以匹配音频长度= 音频时长
cut_off音频在视频结束时截断= min(视频, 音频)
silence视频末尾以静音填充= 视频时长
remap重映射音频时间轴以匹配视频= 音频时长
示例:

"loop"

advanced
object

高级选项,提供额外控制能力

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
video.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
video
示例:

"video"