All Products
Search
Document Center

Alibaba Cloud Model Studio:Video style transform API Reference

Last Updated:Jun 10, 2026

Transform input videos into artistic styles while preserving smooth motion and content coherence. Supports eight 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)
%E5%8E%9F%E8%A7%86%E9%A2%91.mp4 input_00002_%E6%BC%AB%E7%94%BBV4_00001.mp4

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

Prerequisites

Before making an API call, complete these steps:

  1. Get an API key from the China (Beijing) region.

  2. Set the API key as an environment variable.

How it works

Video processing is time-consuming, so the API uses asynchronous invocation to prevent timeouts. The workflow:

  1. Submit a task: Send a POST request with video URL and style parameters. The API returns a unique task_id.

  2. Poll for results: Use task_id to check status with GET requests. When the task succeeds, the response includes the transformed video URL.

Input video requirements

Your input video must meet the following requirements:

Constraint Requirement
Resolution Each side must be 256 to 4,096 pixels. Aspect ratio (longer:shorter) cannot exceed 1.8.
Format MP4, AVI, MKV, MOV, FLV, TS, MPG, and MXF
Duration 30 seconds maximum
File size 100 MB maximum
URL encoding URL-encode video URLs containing non-ASCII characters (e.g., Chinese characters).

Supported styles

Style code Style name Notes
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

Step 1: Submit a video style transform task

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

Request headers

Header Type Required Description
Content-Type string Yes The content type. Set to application/json.
Authorization string Yes API key for authentication. Format: Bearer sk-xxxx (Model Studio API key).
X-DashScope-Async string Yes Enables asynchronous processing. Must be set to enable. HTTP requests support only asynchronous processing. If missing, API returns error: "current user api does not support synchronous calls".

Request body

Parameter Type Required Description
model string Yes The model name. Set to video-style-transform.
input object Yes The input content. See input parameters.
parameters object No The video processing parameters. See parameters.

input parameters

Parameter Type Required Description
video_url string Yes The public URL of the input video. Example: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250704/viwndw/%E5%8E%9F%E8%A7%86%E9%A2%91.mp4. The video must meet the input video requirements.

parameters

Parameter Type Required Default Description
style int No 0 The style type. Valid values: 0-7. See Supported styles for the full list.
video_fps int No 15 The frame rate (frames per second, FPS) of the output video. Valid range: [15, 25].
animate_emotion bool No true Whether to optimize facial expressions. Enabling this usually improves lip sync and expression synchronization. For small facial areas, disabling may improve results.
min_len int No 720 The pixel count of the shorter side of the output video, which controls the resolution. Valid values: 720 and 540. This parameter affects billing: a 720p video costs more than a 540p video. For details, see Billing and rate limiting.
use_SR bool No false Whether to apply super-resolution (SR) processing after style transform. Improves video quality at no additional cost. Setting min_len to 540 with SR enabled upgrades the output to 1080p while billing at the 540p rate. This increases processing time and is recommended for high-quality output.

Request examples

Generate a 720p video

curl

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/zh-CN/20250704/viwndw/%E5%8E%9F%E8%A7%86%E9%A2%91.mp4"
    },
    "parameters": {
        "style": 0,
        "video_fps": 15
    }
}'

Python

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/zh-CN/20250704/viwndw/%E5%8E%9F%E8%A7%86%E9%A2%91.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

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/zh-CN/20250704/viwndw/%E5%8E%9F%E8%A7%86%E9%A2%91.mp4"
    },
    "parameters": {
        "style": 0,
        "video_fps": 15,
        "min_len": 540
    }
}'

Python

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/zh-CN/20250704/viwndw/%E5%8E%9F%E8%A7%86%E9%A2%91.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())

Response

Successful response

{
    "output": {
        "task_id": "xxxxxxxx",
        "task_status": "PENDING"
    },
    "request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}

Error response

{
    "code": "InvalidApiKey",
    "message": "Invalid API-key provided.",
    "request_id": "fb53c4ec-1c12-4fc4-a580-xxxxxxxxxxxx"
}

Response parameters

Parameter Type Description
output object The task output information.
output.task_id string The unique ID for the asynchronous task. Use this ID to query the task status and results.
output.task_status string The task status. Possible values: PENDING, RUNNING, SUSPENDED, SUCCEEDED, FAILED.
request_id string The unique request ID. Use this ID to trace and troubleshoot issues.
code string The error code. Returned only when the request fails. For details, see Error messages.
message string The error details. Returned only when the request fails. For details, 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 (status and video URL) is valid for 24 hours and then automatically purged. Query and save results promptly.

Request headers

Header Type Required Description
Authorization string Yes API key for authentication. Format: Bearer sk-xxxx (Model Studio API key).

Path parameters

Parameter Type Required Description
task_id string Yes The task ID returned from Step 1.

Request examples

Replace {task_id} with the actual task_id from the task submission response.

curl

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

Python

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())

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

Submitted tasks are queued and then scheduled. Status changes to RUNNING when scheduled.

{
    "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"
    }
}

Response parameters

Parameter Type Description
request_id string The unique request ID. Use this ID to trace and troubleshoot issues.
output object The task output information.
output.task_id string The task ID. Valid for 24 hours.
output.task_status string The task status. Possible values: PENDING, RUNNING, SUSPENDED, SUCCEEDED, FAILED, UNKNOWN.
output.submit_time string The time when the task was submitted. UTC+8 time zone. Format: YYYY-MM-DD HH:mm:ss.SSS.
output.scheduled_time string The time when the task started running. UTC+8 time zone. Format: YYYY-MM-DD HH:mm:ss.SSS.
output.end_time string The time when the task completed. UTC+8 time zone. Format: YYYY-MM-DD HH:mm:ss.SSS.
output.output_video_url string The URL of the transformed video. Returned only when task_status is SUCCEEDED. Example: http://xxx/result.mp4.
output.code string The error code. Returned only when task_status is FAILED. For details, see Error messages.
output.message string The error details. Returned only when task_status is FAILED. For details, see Error messages.
usage object Usage statistics for the task. Returned only when task_status is SUCCEEDED.
usage.duration float The duration of the generated video in seconds.
usage.SR int The pixel value of the shorter side of the video, used for billing. This value matches the min_len value you set in the request.

Billing and rate limiting

Charged only for successful tasks. Fee is calculated from output video duration (seconds) and selected resolution.

Billing formula: Total fee = Output video duration (seconds) x Unit price for the corresponding resolution

Final fee is calculated from duration and SR fields in the usage object.

Pricing

Model Resolution Unit price
video-style-transform 720p $0.071677/second
video-style-transform 540p $0.028671/second

Rate limits

Rate limits shared across accounts and RAM users.

Limit type Value
Queries per second (QPS) for task submission API 2
Concurrent tasks 1

Billing example

Example: Submit a 10-second video with 720p resolution. If the task succeeds, the fee is: 10 seconds × $0.071677/second = $0.71677.

Error codes

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

Appendix: More style effect demonstrations

Style name Original video Transformed video
Japanese manga (style=0) %E5%8E%9F%E8%A7%86%E9%A2%91.mp4 input_00002_%E6%BC%AB%E7%94%BBV4_00001.mp4
American comic (style=1) car_%E5%8E%9F%E5%9B%BE.mp4 car_style_1.mp4
Fresh comic (style=2) %E6%8C%A5%E6%89%8B_%E5%8E%9F%E5%9B%BE.mp4 %E6%8C%A5%E6%89%8B_style_2.mp4
3D cartoon (style=3) %E9%87%8E%E9%A4%90_%E5%8E%9F%E5%9B%BE.mp4 %E9%87%8E%E9%A4%90_style_3.mp4
Chinese cartoon (style=4) %E5%BC%B9%E7%90%B4_%E5%8E%9F%E5%9B%BE.mp4 %E5%BC%B9%E7%90%B4_style_4.mp4
Paper art style (style=5) %E7%94%9F%E6%88%90_%E6%B1%BD%E8%BD%A6.mp4 %E6%B1%BD%E8%BD%A6%E8%8D%89%E5%8E%9F_%E7%BA%B8%E8%89%BA%E9%A3%8E%E6%A0%BC.mp4
Simple illustration (style=6) %E6%A1%8C%E9%9D%A2_%E5%8E%9F%E5%9B%BE.mp4 %E6%A1%8C%E9%9D%A2_style_6.mp4
Chinese ink wash painting (style=7) %E5%8F%A4%E9%95%87_%E5%8E%9F%E5%9B%BE.mp4 %E5%8F%A4%E9%95%87_style_7.mp4