The PixVerse - Video Upscale model enhances input video resolution using super-resolution processing, producing a fixed 4K (3840×2160) output video.
Activate the service
- Go to the Alibaba Cloud Model Studio console, search for PixVerse, find the PixVerse model card, and click Activate Now.
- In the pop-up window, confirm the activation and authorization.
Applicable scope
To ensure a successful API call, make sure that the model, Endpoint URL, and API Key all belong to the same region. Cross-region calls will fail.
- Select model: Verify the region to which the model belongs.
- Select URL: Select the Endpoint URL for the corresponding region.
- Configure API Key: Select the region and obtain and configure an API key, then configure the API key as an environment variable.
The video upscale examples in this topic apply to the China (Beijing) region.
HTTP call
Since video upscale tasks take a relatively long time (typically 1-5 minutes), the API uses asynchronous calls. The entire process consists of two core steps: "Create task -> Poll for result", as follows:
Step 1: Create a task to obtain the task ID
Beijing region: POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
When calling, replace {WorkspaceId} with your actual workspace ID.
- After the task is created, use the
task_idreturned by the API to query the result. The task_id is valid for 24 hours. Do not create duplicate tasks. Just poll to retrieve the result. - For beginner guidance, see Postman.
Request parametersRequest headersContent-Typestring(Required)The request content type. This parameter must be set to application/json.Authorizationstring(Required)Request authentication. The API uses an Alibaba Cloud Model Studio API key for authentication. Example: Bearer sk-xxxx.X-DashScope-Asyncstring(Required)The asynchronous processing configuration parameter. HTTP requests support asynchronous calls only and this parameter must be set to enable.Request bodymodelstring (Required)The model name. Fixed value: pixverse/pixverse-upscale.input object (Required)The basic input information, including the video to be upscaled.
Properties media array (Required)The media resource list. Must contain 1 video element.
Element properties type string (Required)The media asset type. Fixed value:
string (Required)The URL of the input video. Must be a publicly accessible URL.
object (Optional)Video generation parameters, such as whether to add a watermark and the random seed.
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".
integer(Optional)The random number seed, in the range [0, 2147483647].If not specified, the system automatically generates a random seed. To improve the reproducibility of the results, use a fixed seed value.Note that because model generation is probabilistic, even the same seed does not guarantee identical results each time. |
Submit a video file to output a super-resolution video. |
Step 2: Query the result by task ID
Beijing region: GET https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id}
- Polling recommendation: Video generation typically takes several minutes. Use a polling mechanism with a reasonable query interval (e.g., 15 seconds) to retrieve results.
- Task status flow: PENDING (queued) → RUNNING (processing) → SUCCEEDED (success) / FAILED (failure).
- task_id validity: 24 hours. After expiration, results can no longer be queried, and the API will return the task status as
UNKNOWN. - RPS limit: The query API has a default RPS of 20. For higher-frequency queries or event notifications, consider configuring asynchronous task callbacks.
- More operations: For batch queries, task cancellation, and other operations, see Manage asynchronous tasks.
Request parametersRequest headersAuthorizationstring(Required)Request authentication. The API uses an Alibaba Cloud Model Studio API key for authentication. Example: Bearer sk-xxxx.URL path parameterstask_idstring(Required)The task ID. |
Replace {task_id} with the task_id value returned by the previous API call. The task_id is valid for queries for 24 hours. Also, replace {WorkspaceId} with your actual workspace ID. |
Response parametersoutputobjectThe task output information.
Properties task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe task status.
Enumeration values
stringThe task submission time. The format is YYYY-MM-DD HH:mm:ss.SSS.scheduled_time stringThe task execution time. The format is YYYY-MM-DD HH:mm:ss.SSS.end_time stringThe task completion time. The format is YYYY-MM-DD HH:mm:ss.SSS.video_urlstringThe 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 stringThe original input prompt, corresponding to the request parameter prompt.codestringThe error code returned when the request fails. This parameter is not returned on success. For details, see Error codes.messagestringThe detailed information about the failed request. This parameter is not returned on success. For details, see Error codes.objectOutput statistics. Only successful results are counted.
Properties duration integerThe billing duration (in seconds). Rounded up from the uploaded video duration.size stringThe resolution of the output video.fps integerThe frame rate of the output video.SR stringThe resolution tier of the output video.video_count integerThe number of videos. Fixed value: 1. |
|