语音合成

声音克隆

对口型视频

其他

查询任务

通过任务 ID 查询对口型任务的处理进度和结果

查询对口型任务接口

接口地址

GET /api/open/lip-sync/query?id=YOUR_TASK_ID

// 或使用 POST 请求
POST /api/open/lip-sync/query

请求头

Authorization: Bearer YOUR_API_TOKEN  // API 密钥

请求参数 (POST 方式)

{
  "id": string  // 必填,创建任务时返回的任务 ID
}

返回数据

// 成功响应 - 200
{
  "success": true,
  "data": {
    "id": string,               // 任务 ID
    "status": string,           // 任务状态:"pending" | "processing" | "completed" | "failed"
    "progress": number,         // 进度百分比 (0-100)
    "result_url": string,       // 结果视频 URL(completed 时返回)
    "error_message": string,    // 错误信息(failed 时返回)
    "created_at": string,       // 创建时间
    "updated_at": string,       // 更新时间
    "completed_at": string,     // 完成时间
    "credits_used": number      // 消耗的积分
  }
}

// 错误响应
{
  "error": string               // 错误提示信息
}

轮询建议

建议每 3-5 秒查询一次任务状态,直到 status 为 "completed" 或 "failed"

CURL 示例

curl -X GET "https://kittaai.com/api/open/lip-sync/query?id=YOUR_TASK_ID" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

在线调试

轮询建议

建议每 3-5 秒查询一次任务状态,直到 status 为 "completed" 或 "failed"

状态码说明

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