The emoji-v1 model generates facial Emoji videos from portrait images and preset template IDs.
This document applies only to the China (Beijing) region. To use the model, you must use an API key from the China (Beijing) region.
Model overview
Model | Description |
emoji-v1 | Generates facial videos from a detected portrait image, coordinates for the face and dynamic expression areas, and a template ID. |
Prerequisites
You must obtain an API key and set the API key as an environment variable.
Process the input image using Emoji image detection to get the coordinates of the face area and the dynamic expression area. These coordinates are required as input parameters.
HTTP
Because video generation is time-consuming (typically 1 to 5 minutes), the API uses asynchronous invocation. The process involves two core steps: Create a task and then Poll for the result. The steps are as follows:
The time required depends on the number of tasks in the queue and the service execution status. Please wait for the task to complete.
Step 1: Create a task and get the task ID
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis
Request parameters | Generate an Emoji video |
Headers | |
Content-Type The content type of the request. Set this parameter to | |
Authorization 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 The asynchronous processing configuration parameter. HTTP requests support only asynchronous processing. You must set this parameter to Important If this request header is missing, the error message "current user api does not support synchronous calls" is returned. | |
Request body | |
model The model name. Set this parameter to | |
input The basic input information, such as the face image, face area, and emoji area. |
Response parameters | Successful responseSave the task_id to query the task status and result. Error responseThe task creation failed. For more information, see Error messages to resolve the issue. |
output Task output information. | |
request_id The unique request ID. You can use this ID to trace and troubleshoot issues. | |
code The error code for a failed request. This parameter is not returned if the request is successful. For more information, see Error messages. | |
message 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 result by task ID
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
Polling suggestion: Video generation takes several minutes. Use a polling mechanism and set a reasonable query interval, such as 15 seconds, to retrieve the result.
Task status transition: PENDING (In queue) → RUNNING (Processing) → SUCCEEDED (Successful) or FAILED (Failed).
Result link: After the task is successful, a video link is returned. The link is valid for 24 hours. After you retrieve the link, immediately download and save the video to a permanent storage service, such as Alibaba Cloud OSS.
task_id validity: 24 hours. After this period, you cannot query the result, and the API returns a task status of
UNKNOWN.
Request parameters | Query task resultsReplace The API keys for the Singapore and Beijing regions are different. Obtain an API key. The following code provides the base_url for the Singapore region. If you use a model in the Beijing region, replace the base_url with https://dashscope.aliyuncs.com/api/v1/tasks/{task_id} |
Headers | |
Authorization The identity authentication credentials for the request. This API uses an Model Studio API key for identity authentication. Example: Bearer sk-xxxx. | |
URL path parameters | |
task_id The task ID. |
Response parameters | Task successfulVideo URLs are retained for only 24 hours and are automatically purged after this period. You must save the generated videos promptly. Task failedIf a task fails, task_status is set to FAILED, and an error code and message are provided. For more information, see Error messages to resolve the issue. Task query expiredThe task_id is valid for 24 hours. After this period, the query fails and the following error message is returned. |
output Task output information. | |
usage The usage statistics for the output. Only successful tasks are counted. | |
request_id The unique request ID. You can use this ID to trace and troubleshoot issues. |
Billing and rate limiting
For the free quota and unit price, see Models and pricing.
For the rate limits, see Rate limiting.
Error codes
If a model call fails and an error message is returned, see Error messages for information about how to resolve the issue.
Appendix: List of template IDs
Example of parameter settings: { "input": { "driven_id": "mengwa_kaixin" } }.
The following effects are generated by the Tongyi app, which integrates the Emoji model.
The Emoji model generates portrait videos that do not include the stickers or the texts.
Template ID (driven_id) | Effect preview | Template ID (driven_id) | Effect preview |
mengwa_kaixin |
| dagong_zhuakuang |
|
mengwa_dengyan |
| dagong_wunai |
|
mengwa_gandong |
| dagong_weixiao |
|
mengwa_renzhen_1 |
| dagong_ganji |
|
mengwa_jidong |
| jingdian_tiaopi |
|
mengwa_kun_1 |
| jingdian_deyi_1 |
|
mengwa_jiaoxie |
| jingdian_qidai |
|
dagong_kaixin |
| jingdian_landuo_1 |
|
dagong_yangwang |
| jingdian_xianqi |
|
dagong_kunhuo |
| jingdian_lei |
|



















