PixVerse - Video Lip Sync API Reference

Updated at:

The PixVerse - Video Lip Sync model takes a video and audio (or TTS text) as input and generates a lip-synced video aligned with the audio.

ImportantThis document applies only to the China (Beijing) region. Use an API key from this region.

Activate the service

  1. Go to the Alibaba Cloud Model Studio console, search for PixVerse, find the PixVerse model card, and click Activate Now.
  2. In the pop-up window, confirm the activation and authorization.

Applicable scope

To ensure a successful API call, make sure the model, Endpoint URL, and API Key all belong to the same region. Cross-region calls will fail.

NoteThe video lip sync examples in this topic apply to the China (Beijing) region.

HTTP call

Since video lip sync tasks take a long time (typically 1-5 minutes), the API uses asynchronous calls. The entire process includes two core steps: "Create task -> Poll for result", as follows:

Step 1: Create a task and obtain the task ID

Beijing region: POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis

Replace {WorkspaceId} with your actual workspace ID when you call the API.

Note

  • After the task is created successfully, use the task_id returned by the API to query the result. task_id is valid for 24 hours. Do not create the task repeatedly; polling is sufficient.

Request parameters

Headers

Content-Type string (Required)

The content type of the request. Must be application/json.

Authorization string (Required)

Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.

X-DashScope-Async string (Required)

Asynchronous processing configuration parameter. HTTP requests support asynchronous mode only and must be set to enable.

ImportantIf this request header is missing, the error "current user api does not support synchronous calls" is returned.

Request Body

model string (Required)

The model name. Fixed value: pixverse/pixverse-lipsync.

input object (Required)

The basic input information, including the face video and audio source.

Properties

media array (Required)

List of media resources. Must contain one video_url type video, and an audio source (choose one):

  • Option 1 (Audio-driven): Pass an audio_url type audio file.
  • Option 2 (TTS synthesis): Pass both lip_sync_tts_speaker_id and lip_sync_tts_content.

Importantaudio_url and lip_sync_tts_speaker_id + lip_sync_tts_content are mutually exclusive. You cannot pass both at the same time.

Element properties

type string (Required)

Media type identifier. Valid values:

  • video_url: Face video.
  • audio_url: Audio file.
  • lip_sync_tts_speaker_id: TTS voice ID.
  • lip_sync_tts_content: TTS text content.

url string (Conditionally required)

Required when type is video_url or audio_url. The URL of the media resource.

  • video_url: URL of the input video. The video must contain a face suitable for lip syncing.

    • File size: Maximum 250 MB.
    • Duration: Maximum 300 seconds.
    • Supported formats: MP4, MOV, WebM.
  • audio_url: URL of the audio file.

    • File size: Maximum 100 MB.
    • Duration: Maximum 300 seconds.
    • Supported formats: MP3, WAV, M4A, AAC.

id string (Conditionally required)

Required when type is lip_sync_tts_speaker_id. TTS voice ID. Set to auto for random voice selection, or use a numeric string to specify a voice ID. See the table below for supported values.

Voice table

id value

Voice name

auto

Random

2

Zhan Youyu

4

Foreign Ali

6

Li Jie

10

Jiang Jianghao

11

Lao Sen

12

Li Jack

13

Qian Duoduo

14

Daimeng Wang Xiaopai

16

Tunli Da Sang

18

Yuyu Hanzi

19

Baodao Nannang

20

Shaanxi Zhanggui

21

HK Style A Sir

content string (Conditionally required)

Required when type is lip_sync_tts_content. Text content to drive lip sync. Supports both Chinese and English, maximum 200 characters (UTF-8 encoded).

parameters object (Optional)

Video generation parameters, such as watermark settings.

Properties

watermark boolean (Optional)

Whether to add a watermark. The watermark is located at the bottom-right corner of the video with the fixed text "AI-generated".

  • false: Default value. No watermark is added.
  • true: A watermark is added.

Audio-driven

Pass in a video and an audio file to generate a lip-synced video.

# 调用时请将 {WorkspaceId} 替换为真实的业务空间ID。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "pixverse/pixverse-lipsync",
    "input": {
        "media": [
            {
                "type": "video_url",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250717/pvegot/input_video_01.mp4"
            },
            {
                "type": "audio_url",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250717/aumwir/stella2-%E6%9C%89%E5%A3%B0%E4%B9%A67.wav"
            }
        ]
    },
    "parameters": {
        "watermark": true
    }
}'

Python SDK

import dashscope
import os
from dashscope import DashScopeError

# 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx"
# 获取API Key:https://help.aliyun.com/zh/model-studio/get-api-key
client = dashscope.Client(api_key=os.getenv("DASHSCOPE_API_KEY"))

media = [{'type': 'video_url', 'url': 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250717/pvegot/input_video_01.mp4'}, {'type': 'audio_url', 'url': 'https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250717/aumwir/stella2-%E6%9C%89%E5%A3%B0%E4%B9%A67.wav'}]

def sample_async_call():
    # 异步提交视频生成任务
    try:
        job = client.videos.jobs.create(model='pixverse/pixverse-lipsync',
                                        media=media,
                                        watermark=True)
        print(job)
        print("task_id: %s" % job.task_id)
    except DashScopeError as e:
        print(f"HTTP返回码:{e.status_code}")
        print(f"错误码:{e.code}")
        print(f"错误信息:{e.message}")
        print("请参考文档:https://help.aliyun.com/zh/model-studio/developer-reference/error-code")
        return

    # 查询任务状态
    try:
        snapshot = client.videos.jobs.fetch(job.task_id)
        print(snapshot.status)
    except DashScopeError as e:
        print(f"HTTP返回码:{e.status_code}")
        print(f"错误码:{e.code}")
        print(f"错误信息:{e.message}")
        print("请参考文档:https://help.aliyun.com/zh/model-studio/developer-reference/error-code")

    # 等待任务完成
    try:
        done = client.videos.jobs.wait(job)
        print(done)
        print(done.video_url)
    except DashScopeError as e:
        print(f"HTTP返回码:{e.status_code}")
        print(f"错误码:{e.code}")
        print(f"错误信息:{e.message}")
        print("请参考文档:https://help.aliyun.com/zh/model-studio/developer-reference/error-code")

if __name__ == '__main__':
    sample_async_call()

TTS text-driven

Pass in a video and TTS text. The model synthesizes speech and generates a lip-synced video.

# 调用时请将 {WorkspaceId} 替换为真实的业务空间ID。
curl --location 'https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "pixverse/pixverse-lipsync",
    "input": {
        "media": [
            {
                "type": "video_url",
                "url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250717/pvegot/input_video_01.mp4"
            },
            {
                "type": "lip_sync_tts_speaker_id",
                "id": "auto"
            },
            {
                "type": "lip_sync_tts_content",
                "content": "保持热爱持续开心,琐碎小事不值得烦心"
            }
        ]
    },
    "parameters": {
        "watermark": true
    }
}'

Step 2: Query the result by task ID

Beijing region: GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}

Note

  • Polling recommendation: Video generation takes several minutes. We recommend using a polling mechanism with a reasonable query interval (such as 15 seconds) to obtain the result.
  • Task status flow: PENDING (queued) → RUNNING (processing) → SUCCEEDED (success) / FAILED (failure).
  • task_id validity: 24 hours. After expiration, the result cannot be queried and the API will return task status UNKNOWN.
  • RPS limit: The default RPS for the query API is 20. For higher-frequency queries or event notifications, consider Configure asynchronous task callbacks.
  • More operations: For batch queries, task cancellation, and other operations, see Manage asynchronous tasks.

Request parameters

Headers

Authorization string (Required)

Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.

Path parameters

task_id string (Required)

The ID of the task.

Query task result

Replace {task_id} with the task_id value returned by the previous API call. The task_id is valid for queries for 24 hours. Replace {WorkspaceId} with your actual workspace ID.

curl -X GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

Response parameters

outputobject

Task output information.

Properties

task_id string

The task ID. Valid for queries for 24 hours.

task_status string

The status of the task.

Enumeration values

  • PENDING: The task is queued.
  • RUNNING: The task is being processed.
  • SUCCEEDED: The task succeeded.
  • FAILED: The task failed.
  • CANCELED: The task was canceled.
  • UNKNOWN: The task does not exist or its status is unknown.
State transitions during polling:
  • PENDING (queued) → RUNNING (processing) → SUCCEEDED (success) / FAILED (failure).
  • The initial query status is usually PENDING (queued) or RUNNING (processing).
  • When the status changes to SUCCEEDED, the response contains the generated video URL.
  • If the status is FAILED, check the error message and retry.
  • If the status is CANCELED, the task was canceled. To continue, submit a new task.
  • If the status is UNKNOWN, the task does not exist or its status is unknown, which can occur when the task_id does not exist or exceeds the 24-hour validity period.

submit_time string

The time when the task was submitted. Format: YYYY-MM-DD HH:mm:ss.SSS.

scheduled_time string

The time when the task was executed. Format: YYYY-MM-DD HH:mm:ss.SSS.

end_time string

The time when the task was completed. Format: YYYY-MM-DD HH:mm:ss.SSS.

video_urlstring

Video URL. Returned only when task_status is SUCCEEDED.

The video format is MP4 (H.264 encoding). The video link currently has no expiration time, but it is not recommended for long-term storage. Download it promptly.

orig_prompt string

The original input prompt, corresponding to the request parameter prompt.

codestring

Error code for failed requests. Not returned for successful requests. See Error codes for details.

messagestring

Detailed error message for failed requests. Not returned for successful requests. See Error codes for details.

usage object

Output statistics. Only counts successful results.

Properties

duration integer

Billing duration (seconds). For the audio-driven mode, the audio duration rounded up. For the TTS mode, the text byte count (UTF-8) ÷ 15, rounded up.

size string

Output video resolution.

fps integer

Output video frame rate.

SR string

Output video resolution tier.

video_count integer

Number of videos. Fixed value: 1.

Task succeeded

{
    "request_id": "ddf8140e-67c6-9e70-8953-xxxxxx",
    "output": {
        "task_id": "1acb9d0c-7a63-4ff6-a198-xxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2026-07-15 17:01:49.352",
        "scheduled_time": "2026-07-15 17:01:49.398",
        "end_time": "2026-07-15 17:02:29.724",
        "video_url": "https://media.pixverseai.cn/xxxx.mp4"
    },
    "usage": {
        "duration": 7,
        "size": "1080*1920",
        "fps": 24,
        "video_count": 1,
        "SR": ""
    }
}

Task failed

If the task execution fails, task_status will be set to FAILED, and an error code and message will be provided. See Error codes for troubleshooting.

{
    "request_id": "e5d70b02-ebd3-98ce-9fe8-759d7d7b107d",
    "output": {
        "task_id": "86ecf553-d340-4e21-af6e-a0c6a421c010",
        "task_status": "FAILED",
        "code": "InvalidParameter",
        "message": "Invalid field type or value. Please verify your input data."
    }
}

Task query expired

The task_id can be queried within 24 hours; after the timeout, it can no longer be queried and the following error message will be returned.

{
    "request_id": "a4de7c32-7057-9f82-8581-xxxxxx",
    "output": {
        "task_id": "502a00b1-19d9-4839-a82f-xxxxxx",
        "task_status": "UNKNOWN"
    }
}

Error codes

If the model call fails and returns an error message, see Error codes for resolution.