All Products
Search
Document Center

Alibaba Cloud Model Studio:Video style transform API Reference

Last Updated:Oct 20, 2025

The Video Style Transform API converts input videos into various preset artistic styles. It ensures smooth motion and content coherence. The API supports eight preset styles: Japanese manga, American comic, fresh comic, 3D cartoon, Chinese cartoon, paper art, simple illustration, and Chinese ink wash painting.

Important

This model service is available only in the China (Beijing) region. You must use an API key from this region for API calls.

Performance showcase

Input video

Output video (Japanese manga)

For more examples, see Appendix: More style effect demonstrations.

Prerequisites

Before making an API call, get an API key and set it as environment variable.

HTTP

Video processing is time-consuming. To prevent requests from timing out, video style transform uses asynchronous invocation. The process involves two steps:

  1. Submit an asynchronous task: Send a POST request with the source video URL and desired style parameters to obtain a unique task_id.

  2. Query the task result: Use the task_id to poll the task status through a GET request until the task is complete. Then, retrieve the URL of the resulting video.

Step 1: Submit a video style transform task

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis

Request

Generate a 720p video
curl --location --request POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "video-style-transform",
    "input": {
        "video_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20250704/viwndw/original_video.mp4"
    },
    "parameters": {
        "style": 0,
        "video_fps": 15
    }
}'
import requests
import os


DASHSCOPE_API_KEY = os.getenv("DASHSCOPE_API_KEY")
# Replace this with your video URL
video_url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20250704/viwndw/original_video.mp4"

response = requests.post(
            "https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis",
            headers={
                "Authorization": f"Bearer {DASHSCOPE_API_KEY}",
                "X-DashScope-Async": "enable",
            },
            json={
            "model": "video-style-transform",
            "input": {
                "video_url": video_url
            },
            "parameters": {
                "style": 0,
                "video_fps": 15
            }
        }
        )
print(response.json())
Generate a 540p video
curl --location --request POST 'https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "video-style-transform",
    "input": {
        "video_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20250704/viwndw/original_video.mp4"
    },
    "parameters": {
        "style": 0,
        "video_fps": 15,
        "min_len": 540
    }
}'
import requests
import os


DASHSCOPE_API_KEY = os.getenv("DASHSCOPE_API_KEY")
# Replace this with your video URL
video_url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20250704/viwndw/original_video.mp4"

response = requests.post(
            "https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis",
            headers={
                "Authorization": f"Bearer {DASHSCOPE_API_KEY}",
                "X-DashScope-Async": "enable",
            },
            json={
            "model": "video-style-transform",
            "input": {
                "video_url": video_url
            },
            "parameters": {
                "style": 0,
                "video_fps": 15,
                "min_len": 540
            }
        }
        )
print(response.json())
Headers

Content-Type string (Required)

The content type of the request. Set this parameter to application/json.

Authorization string (Required)

The identity authentication credentials for the request. This API uses an Model Studio API key for identity authentication. Example: Bearer sk-xxxx.

X-DashScope-Async string (Required)

The asynchronous processing configuration parameter. HTTP requests support only asynchronous processing. You must set this parameter to enable.

Important

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

Request Body

model string (Required)

The model name. Set this to video-style-transform.

input object (Required)

The input content.

Properties

video_url string (Required)

The public URL of the input video. Example: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/en-US/20250704/viwndw/original_video.mp4.

Requirements for the input video:

  • Resolution: The length of each side of the video must be between 256 pixels and 4096 pixels. The aspect ratio of the longer side to the shorter side cannot exceed 1.8.

  • Format: MP4, AVI, MKV, MOV, FLV, TS, MPG, and MXF are supported.

  • Duration: Cannot exceed 30 seconds.

  • Size: Cannot exceed 100 MB.

  • URL: If the original URL contains non-ASCII characters, such as Chinese characters, URL-encode it first.

parameters object (Optional)

The video processing parameters.

Properties

style int (Optional)

The style type. The preset types are as follows:

  • 0: Japanese manga (default)

  • 1: American comic

  • 2: Fresh comic

  • 3: 3D cartoon

  • 4: Chinese cartoon (best for inputs with ancient costumes)

  • 5: Paper art style

  • 6: Simple illustration

  • 7: Chinese ink wash painting

video_fps int (Optional)

The frame rate of the generated video. The default value is 15. The valid range is [15, 25].

animate_emotion bool (Optional)

Specifies whether to optimize facial expressions. The default value is true.

Enabling this option usually improves the synchronization of lip movements and expressions. If the facial area is small, disabling this option may produce better results.

min_len int (Optional)

Specifies the pixel count of the shorter side of the output video to control the resolution. Valid values are 720 and 540. The default value is 720.

Note

This parameter affects billing. A 720p video costs more than a 540p video. For more information, see Billing and rate limiting.

use_SR bool (Optional)

Specifies whether to apply super-resolution (SR) processing to the video after style transform. The default value is false. If you set this to true, video quality is improved at no additional cost.

Note

If you set min_len to 540 and enable this option, the output video is upgraded to 1080p resolution, but you are still billed based on the 540p standard. This increases the processing time. We recommend that you enable this option when you require high-quality output.

Response

Successful response
{
    "output": {
	  "task_id": "xxxxxxxx", 
    	  "task_status": "PENDING"
    },
    "request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}
Abnormal response
{
    "code":"InvalidApiKey",
    "message":"Invalid API-key provided.",
    "request_id":"fb53c4ec-1c12-4fc4-a580-xxxxxxxxxxxx"
}

output object

The task output information.

Properties

task_id string

The unique ID for the asynchronous task. This ID is used for subsequent queries.

task_status string

The task status.

  • PENDING

  • RUNNING

  • SUSPENDED

  • SUCCEEDED

  • FAILED

request_id string

The unique request ID. You can use this ID to trace and troubleshoot issues.

code string

The error code for a failed request. This parameter is not returned if the request is successful. For more information, see Error messages.

message string

The detailed information about a failed request. This parameter is not returned if the request is successful. For more information, see Error messages.

Step 2: Query the task status and result

GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
Important

Task result data, such as the task status and the generated video URL, is valid for 24 hours. After this period, the data is automatically purged. Query and save the results promptly.

Request

Get the task result

You need to replace {task_id} with the actual task_id.

curl -X GET \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
import requests
import os

DASHSCOPE_API_KEY = os.getenv("DASHSCOPE_API_KEY")
# Replace task_id with your task_id
task_id = "0c9c33e6-b2e7-41e5-*********"

task_response = requests.get(
        f"https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}",
        headers={
            "Authorization": f"Bearer {DASHSCOPE_API_KEY}"
        })
print(task_response.json())
Headers

Authorization string (Required)

The identity authentication credentials for the request. This API uses an Model Studio API key for identity authentication. Example: Bearer sk-xxxx.

Path parameters

task_id string (Required)

The task ID.

Response

Task succeeded
{
    "request_id": "b67df059-ca6a-9d51-afcd-xxxxxxxxxxxx",
    "output": {
        "task_id": "d76ec1e8-ea27-4038-8913-xxxxxxxxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2024-05-16 13:50:01.247",
        "scheduled_time": "2024-05-16 13:50:01.354",
        "end_time": "2024-05-16 13:50:27.795",
        "output_video_url": "http://xxx/result.mp4"
    },
    "usage": {
        "duration": 3,
        "SR": 720 
    }
}
Task running

After a task is submitted, it is placed in a queue. After it is scheduled, its status changes to RUNNING.

{
    "request_id":"e5d70b02-ebd3-98ce-9fe8-xxxxxxxxxxxx",
    "output":{
        "task_id":"13b1848b-5493-4c0e-xxxxxxxxxxxx",
        "task_status":"RUNNING",
        "submit_time":"2025-09-08 15:53:13.143",
        "scheduled_time":"2025-09-08 15:53:13.169"
    }
}
Task failed
{
    "request_id": "dccfdf23-b38e-97a6-a07b-xxxxxxxxxxxx",
    "output": {
        "task_id": "4cbabbdf-2c1f-43f4-b983-xxxxxxxxxxxx",
        "task_status": "FAILED",
        "submit_time": "2024-05-16 14:15:14.103",
        "scheduled_time": "2024-05-16 14:15:14.154",
        "end_time": "2024-05-16 14:15:14.694",
        "code": "InvalidParameter.FileDownload",
        "message": "download for input video error"
    }
}

request_id string

The unique ID of the request. You can use this ID to trace request details and troubleshoot issues.

output object

The task output information.

Properties

output_video_url string

The URL of the resulting video. Example: http://xxx/result.mp4.

task_id string

The task ID. The query is valid for 24 hours.

task_status string

The task status.

  • PENDING

  • RUNNING

  • SUSPENDED

  • SUCCEEDED

  • FAILED

  • UNKNOWN

submit_time string

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

scheduled_time string

The time when the task started running. The format is YYYY-MM-DD HH:mm:ss.SSS.

end_time string

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

code string

The error code for a failed request. This parameter is not returned if the request is successful. For more information, see Error messages.

message string

The detailed information about a failed request. This parameter is not returned if the request is successful. For more information, see Error messages.

usage object

Usage statistics for the task.

Properties

duration float

The duration of the generated video in seconds.

SR int

The pixel value of the shorter side of the video used for billing. This value is the same as the min_len value you set in the request.

Billing and rate limiting

You are charged only for successful tasks. The fee is calculated based on the actual duration (in seconds) of the output video and the selected resolution.

Billing formula: Total fee = Output video duration (seconds) × Unit price for the corresponding resolution (Note: The final fee is calculated based on the duration and SR fields in the usage object that is returned for a successful task.)

Model

Unit price

Rate limit (shared by Alibaba Cloud accounts and RAM users)

QPS limit for task submission API

Number of concurrent tasks

video-style-transform

720p

$0.071677/second

2

1

540p

$0.028671/second

Billing example

For example, assume you submit a 10-second video and select the 720p resolution for style transform. If the task is successful and the generated video is 10 seconds long, the fee for this task is: 10 seconds × $0.071677/second = $0.71677.

Error codes

If a call fails, see Error messages for troubleshooting.

Appendix: More style effect demonstrations

Style name

Original video

Repaint Effect

Japanese manga (style=0)

American comic (style=1)

Fresh comic (style=2)

3D cartoon (style=3)

Chinese cartoon (style=4)

Paper art style (style=5)

Simple illustration (style=6)

Chinese ink wash painting (style=7)