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.
ImportantThis document applies only to the China (Beijing) region, and you must use an API key from this region.
Video processing is time-consuming. To avoid synchronous request timeouts, video style transform uses asynchronous invocation, which consists of the following two steps:
Submit an asynchronous task: Send a POST request with the original video URL and the desired style parameters to obtain a unique task_id.
Query the task result: Use the task_id to poll the task status with GET requests until the task is completed and the URL of the result video is obtained.
Step 1: Submit a video style transform task
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
Request
Request headers
Content-Typestring (required)
The content type of the request. This parameter must be set to application/json.
Authorizationstring (required)
The authentication of the request. The API uses an Alibaba Cloud Model Studio API key for authentication. Example value: Bearer sk-xxxx.
X-DashScope-Asyncstring (required)
The asynchronous processing configuration parameter. HTTP requests only support asynchronous processing, and it must be set toenable.
ImportantIf this header is missing, the following error is returned: "current user api does not support synchronous calls".
Request body
modelstring (required)
The model name. Set it to video-style-transform.
inputobject (required)
The input content.
Attributes
video_urlstring (required)
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.
Input video requirements:
Resolution: Each side of the video must be no less than 256 pixels and no more than 4,096 pixels. The ratio of the long side to the short side cannot exceed 1.8.
Format: MP4, AVI, MKV, MOV, FLV, TS, MPG, and MXF are supported.
Duration: No more than 30 seconds.
Size: No more than 100 MB.
URL: If the original URL contains non-ASCII characters such as Chinese characters, URL-encode it first.
parametersobject (optional)
The video processing parameters.
Attributes
styleint (optional)
The style type. Preset types are as follows:
0: Japanese manga, the default value
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_fpsint (optional)
The frame rate of the generated video. The default is 15, and the valid range is [15, 25].
animate_emotionbool (optional)
Whether to optimize facial expressions. The default is true.
When enabled, it usually improves the accuracy of lip sync and expression synchronization. When the face area accounts for a small proportion of the frame, disabling this option may produce better results.
min_lenint (optional)
The short-side pixel count of the output video, used to control the resolution. Valid values are 720 or 540, and the default is 720.
NoteThis parameter value affects billing. A 720P video costs more than a 540P video. For details, see Billing and rate limiting.
use_SRbool (optional)
Whether to apply super-resolution (SR) processing to the style-transformed video. The default is false. Setting it to true improves the video quality at no extra cost.
NoteIf min_len is set to 540, enabling this option upgrades the output video to 1080P quality, but billing is still based on the 540P standard. This increases the processing time. We recommend enabling it when high-quality output is required.
The task ID, the unique identifier of the task, used for subsequent queries.
task_statusstring
The task status.
PENDING: Queued
RUNNING: Processing
SUSPENDED: Suspended
SUCCEEDED: Succeeded
FAILED: Failed
request_idstring
The unique identifier of the request. It can be used for request tracing and troubleshooting.
codestring
The error code returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes.
messagestring
The detailed error information returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes.
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
ImportantTask result data (such as the task status and the generated video URL) is valid for 24 hours and is automatically cleared after expiration. Make sure to query and save the results in time.
Request
Request headers
Authorizationstring (required)
The authentication of the request. The API uses an Alibaba Cloud Model Studio API key for authentication. Example value: Bearer sk-xxxx.
URL path parameters
task_idstring (required)
The task ID.
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}
The unique identifier of the request. It can be used for request tracing and troubleshooting.
outputobject
The task output information.
Attributes
output_video_urlstring
The URL of the result video. Example: http://xxx/result.mp4.
task_idstring
The task ID. Valid for queries within 24 hours.
task_statusstring
The task status.
PENDING: Queued
RUNNING: Processing
SUSPENDED: Suspended
SUCCEEDED: Succeeded
FAILED: Failed
UNKNOWN: The task does not exist or its status is unknown.
submit_timestring
The time when the task was submitted. Format: YYYY-MM-DD HH:mm:ss.SSS.
scheduled_timestring
The time when the task was executed. Format: YYYY-MM-DD HH:mm:ss.SSS.
end_timestring
The time when the task was completed. Format: YYYY-MM-DD HH:mm:ss.SSS.
codestring
The error code returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes.
messagestring
The detailed error information returned when the request fails. This parameter is not returned when the request succeeds. For details, see Error codes.
usageobject
Usage statistics of the output.
Attributes
durationfloat
The duration of the generated video (in seconds).
SRint
The short-side pixel value of the video used for billing (this value is the same as the min_len value you set in the request).
Only tasks that execute successfully are billed. 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) x Unit price for the corresponding resolution (the final fee will be settled strictly based on theusageobject'sdurationandSRfields returned after the task succeeds)
The free quota is deducted based on the output video duration, regardless of the video resolution.
Rate limits (shared by the primary account and RAM sub-accounts)
QPS limit of the task submission API
Number of tasks being processed simultaneously
video-style-transform
600 seconds
720P
CNY 0.5/second
2
1
540P
CNY 0.2/second
Billing example
Suppose you submit a 10-second video and select the 720P resolution for the style transform, and the video generated after the task succeeds is 10 seconds long. The fee for this task is: 10 seconds x CNY 0.5/second = CNY 5.
Error codes
If the model call fails and returns an error message, see Error codes for troubleshooting.