Skip to main content

PixVerse text-to-video API reference

The PixVerse text-to-video model generates a smooth video based on text prompts .

This 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.

Scope

To ensure successful calls, make sure that the model, Endpoint URL, and API Key belong to the same region. Cross-region calls will fail.
The sample code in this topic applies to the China (Beijing) region.

HTTP calls

Because text-to-video tasks take a long time (typically 1 to 5 minutes), the API uses asynchronous calls. The entire process involves two core steps: Create a task -> Poll for the result. The steps are as follows:

Step 1: Create a task to get a 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.
  • After the task is created successfully, use the task_id returned by the API to query the result. The task_id is valid for 24 hours. Do not create the task repeatedly; just poll for the result.
  • For beginner guidance, see Postman.

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 this parameter must be set to enable.
If 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.Valid values:
  • pixverse/pixverse-v6-max-t2v
  • pixverse/pixverse-c1-t2v
  • pixverse/pixverse-v6-t2v
  • pixverse/pixverse-v5.6-t2v

Model selection

  • We recommend using v6-max.
  • For dynamic scenes such as fights, special spell effects, and high-speed motion, you can use c1.
input object (Required)The basic input information, such as the prompt.

Properties

prompt string (Required)The text prompt. It describes the desired elements and visual features in the generated video.Both Chinese and English are supported. Each Chinese character or letter counts as one character. The character encoding is UTF-8. Any excess characters are automatically truncated.
  • pixverse/pixverse-v6-max-t2v: Up to 5,000 characters.
  • pixverse/pixverse-c1-t2v: Up to 5,000 characters.
  • pixverse/pixverse-v6-t2v: Up to 5,000 characters.
  • pixverse/pixverse-v5.6-t2v: Up to 2,048 characters.
parameters object (Required)The video generation parameters, such as the video resolution, duration, and whether to generate audio.

Properties

resolution string (Conditionally required)Required when using pixverse/pixverse-v6-max-t2v.
The resolution parameter directly affects the cost. Before making a call, confirm the model pricing.
The resolution tier of the generated video.Valid values:
  • 360P
  • 540P
  • 720P
  • 1080P
The video resolution is determined by resolution and aspect_ratio. You do not need to set size.aspect_ratio string (Optional)The aspect ratio of the generated video.Valid values:
  • 16:9: Default value
  • 4:3
  • 1:1
  • 3:4
  • 9:16
  • 3:2
  • 2:3
  • 21:9
size string (Conditionally required)Required when using pixverse/pixverse-c1-t2v, pixverse/pixverse-v6-t2v, or pixverse/pixverse-v5.6-t2v.The resolution of the generated video, in the format of width*height in pixels.
  • The size parameter directly affects the cost. Before making a call, confirm the model pricing.
  • If you use the pixverse/pixverse-v5.6-t2v model and set size=1808*1808 and duration to 8, the actual output video resolution will be 1440*1440.
The following tables list the valid values for different resolution tiers and aspect ratios.

pixverse/pixverse-c1-t2v and pixverse/pixverse-v6-t2v models

Resolution tier

Aspect ratio

size value (width*height)

360P

16:9

640*360

4:3

640*480

1:1

640*640

3:4

480*640

9:16

360*640

3:2

640*432

2:3

432*640

21:9

640*288

540P

16:9

1024*576

4:3

1024*768

1:1

1024*1024

3:4

768*1024

9:16

576*1024

3:2

1024*688

2:3

688*1024

21:9

1024*448

720P

16:9

1280*720

4:3

1108*832

1:1

960*960

3:4

832*1108

9:16

720*1280

3:2

1200*800

2:3

800*1200

21:9

1280*560

1080P

16:9

1920*1080

4:3

1664*1248

1:1

1440*1440

3:4

1248*1664

9:16

1080*1920

3:2

1776*1184

2:3

1184*1776

21:9

1920*832

pixverse/pixverse-v5.6-t2v model

Resolution tier

Aspect ratio

size value (width*height)

360P

16:9

640*360

4:3

640*480

1:1

640*640

3:4

480*640

9:16

360*640

540P

16:9

1024*576

4:3

1024*768

1:1

1024*1024

3:4

768*1024

9:16

576*1024

720P

16:9

1280*720

4:3

1280*960

1:1

1280*1280

3:4

960*1280

9:16

720*1280

1080P

16:9

1920*1080

4:3

1920*1440

1:1

1808*1808

3:4

1440*1920

9:16

1080*1920

duration integer (Required)
The duration parameter directly affects the cost, which is billed per second. Before making a call, confirm the model pricing.
The duration of the generated video, in seconds.
  • pixverse/pixverse-v6-max-t2v: The value is an integer between [1, 15].
  • pixverse/pixverse-c1-t2v: The value is an integer between [1, 15].
  • pixverse/pixverse-v6-t2v: The value is an integer between [1, 15].
  • pixverse/pixverse-v5.6-t2v:
    • When size is any resolution corresponding to 360P, 540P, or 720P: 5, 8, or 10.
    • When size is any resolution corresponding to 1080P: 5 or 8.
audio boolean (Optional)
The audio parameter directly affects the cost. Before making a call, confirm the model pricing.
Specifies whether to generate a video with audio. If enabled, the model automatically generates matching background music or sound effects based on the video content.
  • false: Default value. Outputs a silent video.
  • true: Outputs a video with audio.
watermark boolean (Optional)Specifies whether to add a watermark. The watermark is located in the lower-right corner of the video and displays the text "AI Generated".
  • false: Default value. No watermark is added.
  • true: A watermark is added.
shot_type string (Optional)Supported model: pixverse/pixverse-v6-t2v.Specifies the shot type of the generated video. This controls whether the video consists of a single continuous shot or multiple shots.
  • single: Default value. Generates a single-shot video.
  • multi: Multi-shot. The system intelligently segments the shots.
Usage suggestion: The prompt parameter has a higher priority than shot_type. For best results, we recommend that this parameter setting be consistent with the prompt description.
  • To consistently output a single-shot video: Set shot_type="single" and describe a single-shot scene in the prompt.
  • To consistently output a multi-shot video: Set shot_type="multi" and describe a multi-shot scene in the prompt.
seed integer (Optional)The random number seed must be an integer in the range [0, 2147483647].If not specified, a random seed is generated. A fixed seed improves reproducibility.Because model generation is probabilistic, the same seed does not guarantee identical results.
  • Text-to-video (v6-max)
  • Text-to-video
  • Text-to-video (multi-shot)
Supported model: pixverse/pixverse-v6-max-t2v.
# 调用时请将 {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-v6-max-t2v",
    "input": {
        "prompt": "下着雨,赛博城市里,一只浣熊在栏杆上行走。突然他眼睛发出蓝光,变身成一架高科技无人机,快速飞离画面。"
    },
    "parameters": {
        "resolution": "720P",
        "aspect_ratio": "16:9",
        "duration": 5,
        "audio": true,
        "watermark": true
    }
}'

Response parameters

output objectThe output of the task.

Properties

task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.

Enumeration values

  • PENDING
  • RUNNING
  • SUCCEEDED
  • FAILED
  • CANCELED
  • UNKNOWN: The task does not exist or its status is unknown.
request_idstringUnique request identifier for tracing and troubleshooting.codestringError code. Returned only for failed requests. See Error codes.messagestringDetailed error message. Returned only for failed requests. See Error codes.
  • Successful response
  • Error response
Save the task_id, which is used to query the task status and results.
{
    "output": {
        "task_status": "PENDING",
        "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
    },
    "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

Step 2: Query the result by task ID

Beijing region: GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
  • Polling suggestion: Video generation takes several minutes. We recommend using a polling mechanism with a reasonable query interval (for example, 15 seconds) to obtain the result.
  • Task status flow: PENDING (in queue) -> RUNNING (processing) -> SUCCEEDED (successful) / FAILED (failed).
  • task_id validity: 24 hours. After this period, you cannot query the result, and the API will return the task status as UNKNOWN.
  • RPS limit: The default records per second (RPS) for the query API is 20. For higher frequency queries or event notifications, we recommend configuring an asynchronous task callback.
  • More operations: For batch queries, canceling tasks, 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

outputobjectThe output of the task.

Properties

task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.

Enumeration values

  • PENDING
  • RUNNING
  • SUCCEEDED
  • FAILED
  • CANCELED
  • UNKNOWN: The task does not exist or its status is unknown.
State transitions during polling:
  • PENDING → RUNNING → SUCCEEDED or FAILED.
  • The initial query status is usually PENDING or RUNNING.
  • When the status changes to SUCCEEDED, the response contains the generated video URL.
  • If the status is FAILED, check the error message and retry the task.
submit_time stringThe time when the task was submitted. format is YYYY-MM-DD HH:mm:ss.SSS.scheduled_time stringThe time when the task was executed. format is YYYY-MM-DD HH:mm:ss.SSS.end_time stringThe time when the task was completed. format is YYYY-MM-DD HH:mm:ss.SSS.video_urlstringThe video URL. This is returned only when task_status is SUCCEEDED.The video is in MP4 format (H.264 encoding). The video link does not currently expire, but we recommend downloading it for long-term storage.orig_prompt stringThe original input prompt, corresponding to the request parameter prompt.codestringError code. Returned only for failed requests. See Error codes.messagestringDetailed error message. Returned only for failed requests. See Error codes.
usage objectStatistics for the output information. Only successful results are counted.

Properties

duration integerThe total duration of the generated video in seconds, used for billing.size stringThe resolution of the generated video.fps integerThe frame rate of the generated video.SR stringThe resolution tier of the generated video.audio booleanIndicates whether the generated video has audio.video_count integerThe number of generated videos. The value is fixed at 1.This field is not returned when you use pixverse/pixverse-v6-max-t2v.shot_typestringThe shot type of the generated video.This field is not returned when you use pixverse/pixverse-v6-max-t2v.
request_idstringUnique request identifier for tracing and troubleshooting.
  • Task successful
  • Task failed
  • Task query expired
{
    "request_id": "19171ea5-9efb-4d35-93a1-xxxxxx",
    "output": {
        "task_id": "7ed706b7-a9a9-4319-820c-xxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2026-03-20 10:34:41.630",
        "scheduled_time": "2026-03-20 10:34:41.655",
        "end_time": "2026-03-20 10:35:12.725",
        "orig_prompt": "下着雨,赛博城市里,一只浣熊在栏杆上行走。突然他眼睛发出蓝光,变身成一架高科技无人机,快速飞离画面。",
        "video_url": "https://media.pixverseai.cn/xxxx.mp4"
    },
    "usage": {
        "duration": 5,
        "shot_type": "single",
        "size": "1280*720",
        "fps": 24,
        "video_count": 1,
        "audio": false,
        "SR": "720"
    }
}

DashScope SDK calls

The parameter names in the SDK are mostly consistent with the HTTP API. The parameter structure is adapted to the features of each programming language. Because text-to-video tasks take a long time (typically 1 to 5 minutes), the SDK encapsulates the HTTP asynchronous call process and supports both synchronous and asynchronous call methods.
The specific time required depends on the number of tasks in the queue and the service execution status. Please be patient while waiting for the result.

Python SDK calls

Make sure that your DashScope Python SDK version is 2.0.1or later before running the following code.
Beijing region: region="cn-beijing" Replace {WorkspaceId} with your actual workspace ID. The region value varies by region.
  • Synchronous call
  • Asynchronous call
Request example
import os
import dashscope
from dashscope import DashScopeError

# 以下为华北2(北京)地域的配置。请将 {WorkspaceId} 替换为您的百炼业务空间ID,各地域的region取值不同。
# 若没有配置环境变量,请用百炼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"),
    workspace="{WorkspaceId}",
    region="cn-beijing",
)

def sample_sync_call_t2v():
    # call sync api, will return the result
    print('please wait...')
    # generate 为一步式调用(提交任务并等待完成),返回已完成的 Job
    try:
        job = client.videos.generate(model='pixverse/pixverse-v6-max-t2v',
                                     prompt='下着雨,赛博城市里,一只浣熊在栏杆上行走。突然他眼睛发出蓝光,变身成一架高科技无人机,快速飞离画面。',
                                     resolution='720P',
                                     duration=5,
                                     watermark=False,
                                     parameters={'aspect_ratio': '16:9', 'audio': False})
        print(job)
        print(job.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_sync_call_t2v()
Response example
video_url does not expire, but it is not intended for long-term storage. We recommend that you download the video promptly.
{
    "request_id": "2b68d32e-86c8-4383-8a18-xxxxxx",
    "task_id": "ec40bb42-02d4-44d8-bf35-xxxxxx",
    "status": "SUCCEEDED",
    "results": [
        {
            "video_url": "https://media.pixverseai.cn/xxx.mp4"
        }
    ],
    "task_metrics": {
        "TOTAL": 1,
        "SUCCEEDED": 1,
        "FAILED": 0
    },
    "usage": {
        "video_count": 1,
        "video_duration": 0,
        "video_ratio": "",
        "duration": 10,
        "size": "1280*720",
        "fps": 24,
        "audio": false,
        "SR": "720"
    }
}

Java SDK calls

Make sure that your DashScope Java SDK version is 2.22.6or later before running the following code.
Beijing region: Constants.baseHttpApiUrl = "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1"; Replace {WorkspaceId} with your actual workspace ID.
  • Synchronous call
  • Asynchronous call
Request example
// 调用时请将 {WorkspaceId} 替换为真实的业务空间ID。
// Copyright (c) Alibaba, Inc. and its affiliates.

import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesis;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisParam;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisResult;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.utils.JsonUtils;
import com.alibaba.dashscope.utils.Constants;

import java.util.HashMap;
import java.util.Map;

public class Text2Video {

    static {
        // 以下为北京地域url
        Constants.baseHttpApiUrl = "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1";
    }

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

    /**
     * Create a video compositing task and wait for the task to complete.
     */
    public static void text2Video() throws ApiException, NoApiKeyException, InputRequiredException {
        VideoSynthesis vs = new VideoSynthesis();
        Map<String, Object> parameters = new HashMap<>();
        parameters.put("aspect_ratio", "16:9");

        VideoSynthesisParam param =
                VideoSynthesisParam.builder()
                        .apiKey(apiKey)
                        .model("pixverse/pixverse-v6-max-t2v")
                        .prompt("下着雨,赛博城市里,一只浣熊在栏杆上行走。突然他眼睛发出蓝光,变身成一架高科技无人机,快速飞离画面。")
                        .resolution("720P")
                        .duration(5)
                        .audio(true)
                        .watermark(true)
                        .seed(12345)
                        .parameters(parameters)
                        .build();
        System.out.println("please wait...");
        VideoSynthesisResult result = vs.call(param);
        System.out.println(JsonUtils.toJson(result));
    }

    public static void main(String[] args) {
        try {
            text2Video();
        } catch (ApiException | NoApiKeyException | InputRequiredException e) {
            System.out.println(e.getMessage());
        }
        System.exit(0);
    }
}
Response example
video_url does not expire but is not intended for long-term storage. You should download the video promptly.
{
    "request_id": "bd1109bd-6c63-4e62-8bb8-xxxxxx",
    "output": {
        "task_id": "72af7c13-dad5-4aaa-b85d-xxxxxx",
        "task_status": "SUCCEEDED",
        "video_url": "https://media.pixverseai.cn/xxx.mp4",
        "orig_prompt": "下着雨,赛博城市里,一只浣熊在栏杆上行走。突然他眼睛发出蓝光,变身成一架高科技无人机,快速飞离画面。",
        "submit_time": "2026-03-20 11:21:13.227",
        "scheduled_time": "2026-03-20 11:21:13.252",
        "end_time": "2026-03-20 11:21:43.924"
    },
    "usage": {
        "video_count": 1,
        "duration": 5.0,
        "size": "1280*720",
        "input_video_duration": 0.0,
        "output_video_duration": 0.0,
        "SR": "720"
    },
    "status_code": 200,
    "code": "",
    "message": ""
}

Error codes

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

FAQ

Q: Why can't I use a 10-second duration with 1080P resolution?

A: The pixverse-v5.6-t2v model does not support a 10-second duration at 1080P. We recommend reducing the resolution to 720P, 540P, or 360P, or switching to the pixverse-c1-t2v or pixverse-v6-t2v model.