Skip to main content
Portrait Animation

Video style transform API Reference

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.

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.
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 videoOutput video (Japanese manga)
%E5%8E%9F%E8%A7%86%E9%A2%91.mp4input_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:
ConstraintRequirement
ResolutionEach side must be 256 to 4,096 pixels. Aspect ratio (longer:shorter) cannot exceed 1.8.
FormatMP4, AVI, MKV, MOV, FLV, TS, MPG, and MXF
Duration30 seconds maximum
File size100 MB maximum
URL encodingURL-encode video URLs containing non-ASCII characters (e.g., Chinese characters).

Supported styles

Style codeStyle nameNotes
0Japanese mangaDefault
1American comic
2Fresh comic
33D cartoon
4Chinese cartoonBest for inputs with ancient costumes
5Paper art style
6Simple illustration
7Chinese 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

HeaderTypeRequiredDescription
Content-TypestringYesThe content type. Set to application/json.
AuthorizationstringYesAPI key for authentication. Format: Bearer sk-xxxx (Model Studio API key).
X-DashScope-AsyncstringYesEnables 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

ParameterTypeRequiredDescription
modelstringYesThe model name. Set to video-style-transform.
inputobjectYesThe input content. See input parameters.
parametersobjectNoThe video processing parameters. See parameters.

input parameters

ParameterTypeRequiredDescription
video_urlstringYesThe 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

ParameterTypeRequiredDefaultDescription
styleintNo0The style type. Valid values: 0-7. See Supported styles for the full list.
video_fpsintNo15The frame rate (frames per second, FPS) of the output video. Valid range: [15, 25].
animate_emotionboolNotrueWhether to optimize facial expressions. Enabling this usually improves lip sync and expression synchronization. For small facial areas, disabling may improve results.
min_lenintNo720The 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_SRboolNofalseWhether 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

ParameterTypeDescription
outputobjectThe task output information.
output.task_idstringThe unique ID for the asynchronous task. Use this ID to query the task status and results.
output.task_statusstringThe task status. Possible values: PENDING, RUNNING, SUSPENDED, SUCCEEDED, FAILED.
request_idstringThe unique request ID. Use this ID to trace and troubleshoot issues.
codestringThe error code. Returned only when the request fails. For details, see Error messages.
messagestringThe 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}
Task result data (status and video URL) is valid for 24 hours and then automatically purged. Query and save results promptly.

Request headers

HeaderTypeRequiredDescription
AuthorizationstringYesAPI key for authentication. Format: Bearer sk-xxxx (Model Studio API key).

Path parameters

ParameterTypeRequiredDescription
task_idstringYesThe 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

ParameterTypeDescription
request_idstringThe unique request ID. Use this ID to trace and troubleshoot issues.
outputobjectThe task output information.
output.task_idstringThe task ID. Valid for 24 hours.
output.task_statusstringThe task status. Possible values: PENDING, RUNNING, SUSPENDED, SUCCEEDED, FAILED, UNKNOWN.
output.submit_timestringThe time when the task was submitted. UTC+8 time zone. Format: YYYY-MM-DD HH:mm:ss.SSS.
output.scheduled_timestringThe time when the task started running. UTC+8 time zone. Format: YYYY-MM-DD HH:mm:ss.SSS.
output.end_timestringThe time when the task completed. UTC+8 time zone. Format: YYYY-MM-DD HH:mm:ss.SSS.
output.output_video_urlstringThe URL of the transformed video. Returned only when task_status is SUCCEEDED. Example: http://xxx/result.mp4.
output.codestringThe error code. Returned only when task_status is FAILED. For details, see Error messages.
output.messagestringThe error details. Returned only when task_status is FAILED. For details, see Error messages.
usageobjectUsage statistics for the task. Returned only when task_status is SUCCEEDED.
usage.durationfloatThe duration of the generated video in seconds.
usage.SRintThe 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

ModelResolutionUnit price
video-style-transform720p$0.071677/second
video-style-transform540p$0.028671/second

Rate limits

Rate limits shared across accounts and RAM users.
Limit typeValue
Queries per second (QPS) for task submission API2
Concurrent tasks1

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 nameOriginal videoTransformed video
Japanese manga (style=0)%E5%8E%9F%E8%A7%86%E9%A2%91.mp4input_00002_%E6%BC%AB%E7%94%BBV4_00001.mp4
American comic (style=1)car_%E5%8E%9F%E5%9B%BE.mp4car_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
Text Generation
Image Generation
  • FAQ
Video Generation
    • Video style transform API Reference
Audio
Realtime API
Text Embedding
Model Production