语音合成

声音克隆

对口型视频

其他

创建任务

上传视频和音频,创建对口型视频任务

创建对口型任务接口

接口地址

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://kittaai.com/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"
  }'

在线调试

video_url 和 audio_url 需要是公网可访问的 URL

状态码说明

状态码说明:
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       // 错误代码(可选)
}