All Products
Search
Document Center

Alibaba Cloud Model Studio:AnimateAnyone action template generation API reference

Last Updated:Mar 15, 2026

This model extracts character movements from videos to generate action templates for AnimateAnyone. This topic describes the template generation API.

Important

This document applies only to the China (Beijing) region. To use the model, you must use an API key for the China (Beijing) region.

Model overview

Model

Description

animate-anyone-template-gen2

Extracts character movements from a motion video to generate a character action template.

Examples

Correct examples

Examples of videos that meet the requirements for creating action templates

Note
  • The person must be fully visible with a clear face and no obscured body parts.

  • The person must appear from the first frame. Action must be continuous (single take). Split videos with scene changes into separate clips.

  • For best results, the person should face the camera in the first frame. Avoid excessive bending, squatting, or crouching.

Incorrect examples

Curled postures and self-occlusion

Multiple people in the frame

Blurry person

Person too small

(Unclear face)

Person too large

(Person not fully visible)

身体遮挡@3x

多人物@3x

f3e2df6643d44db7a7d65d4571609bff_3 (1)

人物过小@3x

人物过大@3x

Note
  • Verify that no frame contains any of the preceding errors to ensure template quality.

  • If the first frame contains any preceding errors, the task may fail.

Important
  • Ensure the uploaded video file complies with relevant laws and regulations.

  • Generated templates preserve uploaded video audio. If you don't want this audio or lack a license for it (e.g., background music), remove it before uploading.

HTTP

Feature description

Generates character action templates for use with the AnimateAnyone video generation API to create character videos.

Prerequisites

  • You have activated Alibaba Cloud Model Studio and created an API key, see Create an API key.

Input limits

  • Video format: MP4, AVI, or MOV.

  • The video file size cannot exceed 200 MB.

  • Video dimensions must be 200-2,048 pixels per side. The frame rate must be 24 fps or higher. Encoding must be H.264 or H.265.

  • The video duration must be from 2 seconds to 60 seconds.

  • The aspect ratio of the video must be between 1:3 and 3:1.

  • Only HTTP URLs are supported. Local file paths are not supported.

Step 1: Create a task and obtain the task ID

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/aa-template-generation/
Note
  • This API call is time-consuming and runs asynchronously.

  • After submission, the system returns a task ID for querying status and results.

Request parameters

Field

Type

Location

Required

Description

Example

Content-Type

String

Header

Yes

Request body format.

application/json

Authorization

String

Header

Yes

Your API key with the Bearer prefix.

Bearer d1**2a

X-DashScope-Async

String

Header

Yes

Set to enable for asynchronous task submission.

enable

model

String

Body

Yes

Model to use.

animate-anyone-template-gen2

input.video_url

String

Body

No

URL of the video to generate an action template from.

  • The video file size cannot exceed 200 MB.

  • The length of each side of the video must be between 200 and 2,048 pixels.

  • The video frame rate must be 24 fps or higher. The video must be encoded in H.264 or H.265.

  • The video duration must be from 2 seconds to 60 seconds.

  • The aspect ratio of the video must be between 1:3 and 3:1.

  • Supported video formats: MP4, AVI, and MOV.

Note

File uploads support only HTTP or HTTPS links. Local file paths are not supported.

http://aaa/bbb.mp4

Response parameters

Field

Type

Description

Example

output.task_id

String

ID of the submitted task. Use this ID to query task results.

a8532587-fa8c-4ef8-82be-0c46b17950d1

output.task_status

String

Task status after submission.

"PENDING"

request_id

String

Unique request identifier.

7574ee8f-38a3-4b1e-9280-11c33ab46e51

Request example

curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/aa-template-generation/' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "animate-anyone-template-gen2",
    "input": {
        "video_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20241210/cwjmsz/1.mp4"
    }
  }'

Response example

{
    "output": {
	"task_id": "a8532587-fa8c-4ef8-82be-xxxxxx", 
    	"task_status": "PENDING"
    },
    "request_id": "7574ee8f-38a3-4b1e-9280-xxxxxx"
}

Step 2: Query the result by task ID

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

Request parameters

Field

Type

Location

Required

Description

Example

Authorization

String

Header

Yes

Your API key with the Bearer prefix.

Bearer d1**2a

task_id

String

URL Path

Yes

ID of the task to query.

a8532587-fa8c-4ef8-82be-0c46b17950d1

Response parameters

Field

Type

Description

Example

output.task_id

String

ID of the queried task.

a8532587-fa8c-4ef8-82be-0c46b17950d1

output.task_status

String

Status of the queried task.

Task statuses:

PENDING

RUNNING

SUCCEEDED

FAILED

UNKNOWN: The task does not exist or its status is unknown.

output.template_id

String

Action template ID returned by the platform. Use this ID with the AnimateAnyone video generation API.

This ID is permission-verified: the account using it must match the account that generated it.

AACT.xxx.xxx-xxx.xxx

usage.video_duration

Float

Duration of the generated template, in seconds.

"video_duration": 10.23

usage.video_ratio

String

Aspect ratio type of the generated template. Value: standard.

"video_ratio": "standard"

request_id

String

Unique request identifier.

7574ee8f-38a3-4b1e-9280-11c33ab46e51

Request example

curl -X GET \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
https://dashscope.aliyuncs.com/api/v1/tasks/<YOUR_TASK_ID>

Response example

{
    "request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51",
    "output": {
        "task_id": "a8532587-fa8c-4ef8-82be-0c46b17950d1",
        "task_status": "SUCCEEDED",
        "template_id": "AACT.xxx.xxx-xxx.xxx"
    },
    "usage": {
        "video_duration": 10.23,
        "video_ratio": "standard"
    }
}
Error response example
{
    "request_id": "7574ee8f-38a3-4b1e-9280-11c33ab46e51",
    "output": {
        "task_id": "a8532587-fa8c-4ef8-82be-0c46b17950d1",
        "task_status": "FAILED",
        "code": "xxx",
        "message": "xxxxxx"
    }
}

What to do next

Use the action template for AnimateAnyone video generation API reference.

Error codes

For common status codes, see Error messages.