The emoji-v1 model generates facial emoji videos from portrait images and preset template IDs .
Model overview
Model | Description |
|---|---|
emoji-v1 | Generates facial videos from portrait images using face coordinates, dynamic expression area coordinates, and template IDs. |
Prerequisites
- Obtain an API key and export 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
Video generation typically takes 1 to 5 minutes, so the API uses asynchronous invocation. Create a task, then poll for results.
Processing time varies based on queue length and service status. Wait for task completion.
Step 1: Create a task and get the task ID
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis
Request parametersHeadersContent-Typestring (Required)The content type of the request. Must be application/json.Authorization string (Required)Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.X-DashScope-Async string (Required)Enables asynchronous processing. HTTP requests support only asynchronous calls. Must be enable.Request bodymodelstring (Required)The model name. Set this parameter to emoji-v1.input object (Required)Basic input information, such as face image, face area, and emoji area.
Properties image_url string (Required)Public URL of a frontal face image. HTTP and HTTPS are supported.Image requirements:
array of integer (Required)Face area coordinates in the image. The format is [x1, y1, x2, y2] in pixels (top-left and bottom-right points).Set this parameter to the value of the output.bbox_face field from the Emoji Image Detection API response.Example: [212,194,460,441].ext_bbox array of integer (Required)Dynamic expression area coordinates. The aspect ratio is about 1:1. The format is [x1, y1, x2, y2] in pixels (top-left and bottom-right points).Set this parameter to the value of the output.ext_bbox_face field in the Emoji image detection API response.Example: [63,30,609,575].Note: The dynamic expression area is the square area that the model focuses on during video generation. It is typically slightly larger than the face area, including background and shoulders for natural animation.driven_id string (Required)The ID of the preset template. For a list of valid values, see Appendix: List of template IDs.Example: mengwa_kaixin. |
|
Response parametersoutputobjectTask status and results.
Properties task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.
Enumeration values
stringUnique request identifier for tracing and troubleshooting.code stringError code. Returned only for failed requests. See Error codes.message stringDetailed error message. Returned only for failed requests. See Error codes. |
Save the task_id to query the task status and result. |
Step 2: Query the result by task ID
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
- Polling recommendation: Video generation takes several minutes. Use a polling mechanism with a reasonable interval, such as 15 seconds.
- Task state transition: PENDING → RUNNING → SUCCEEDED or FAILED.
- Result link: After a task succeeds, a video URL valid for 24 hours is returned. Download and save the video to permanent storage, such as OSS.
task_idvalidity: 24 hours. After this period, queries return the task status asUNKNOWN.
Request parametersHeadersAuthorizationstring (Required)Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx.URL path parameterstask_idstring (Required)The ID of the task. |
Replace 86ecf553-d340-4e21-xxxxxxxxx with your actual task_id.API keys are different for each region. For more information, see Obtain an API key. If you use a model in the China (Beijing) region, replace |
Response parametersoutputobjectTask status and results.
Properties task_id stringThe task ID. Valid for queries for 24 hours.task_status stringThe status of the task.
Enumeration values
stringThe time when the task was submitted. The time is in UTC+8 and the format is YYYY-MM-DD HH:mm:ss.SSS.scheduled_time stringThe time when the task was executed. The time is in UTC+8 and the format is YYYY-MM-DD HH:mm:ss.SSS.end_time stringThe time when the task was completed. The time is in UTC+8 and the format is YYYY-MM-DD HH:mm:ss.SSS.video_url stringURL of the generated video. Returned only when task_status is SUCCEEDED.Valid for 24 hours. The video is in MP4 format with H.264 encoding.code stringError code. Returned only for failed requests. See Error codes.message stringDetailed error message. Returned only for failed requests. See Error codes.objectOutput usage statistics (successful tasks only).
Properties video_duration integerThe duration of the generated video in seconds.Billing: Cost = Video duration (seconds) × Unit price.video_ratio stringVideo aspect ratio. Fixed at standard (1:1).stringUnique request identifier for tracing and troubleshooting. |
Video URLs are valid for only 24 hours and then automatically purged. Save generated videos promptly. |
Billing and rate limiting
- For the free quota and unit price, see Recommended models.
- For the rate limits, see Rate limiting.
Error codes
If a model call fails, see Error codes to resolve the error.
Appendix: List of template IDs
Example: { "input": { "driven_id": "mengwa_kaixin" } }.
- Preview effects generated by Tongyi app (integrates Emoji model).
- Generated videos exclude stickers and text overlays.
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 | ![]() |



















