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 portrait images using face coordinates, dynamic expression area coordinates, and template IDs. |
Prerequisites
-
Get 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 parameters |
Generate an Emoji video
|
Headers |
|
|
Content-Type The content type of the request. Must be |
|
|
Authorization The authentication credentials using a Model Studio API key. Example: |
|
|
X-DashScope-Async Enables asynchronous processing. Must be Important Returns "current user api does not support synchronous calls" error if not included. |
|
Request body |
|
|
model The model name. Set this parameter to |
|
|
input Basic input information, such as face image, face area, and emoji area. |
Response parameters |
Successful responseSave the Error responseTask creation failed. See error codes to resolve the issue. |
|
output Task status and results. |
|
|
request_id Unique identifier for the request. Use for tracing and troubleshooting issues. |
|
|
code The error code. Returned only when the request fails. See error codes for details. |
|
|
message Detailed error message. Returned only when the request fails. See error codes for details. |
Step 2: Query the result by task ID
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
Polling suggestion: Video generation can take several minutes. Use a polling mechanism with a reasonable query interval, such as 15 seconds, to retrieve the result.
Task status transition: PENDING → RUNNING → SUCCEEDED or FAILED.
Result URL: After the task is successful, a video URL is returned. The URL is valid for 24 hours. After you retrieve the URL, you must immediately download and save the video to a permanent storage service, such as Object Storage Service (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 API keys are region-specific. See API key documentation for details. For models in the Beijing region, replace base_url with |
Headers |
|
|
Authorization The authentication credentials using a Model Studio API key. Example: |
|
URL path parameters |
|
|
task_id The ID of the task to query. |
Response parameters |
Task successfulVideo URLs are retained for only 24 hours and then automatically purged. Save generated videos promptly. Task failedWhen a task fails,
Task query expiredThe |
|
output Task status and results. |
|
|
usage Output usage statistics (successful tasks only). |
|
|
request_id Unique identifier for the request. Use for tracing and troubleshooting issues. |
Billing and rate limiting
-
For the free quota and unit price, see Emoji.
-
For the rate limits, see Rate limiting.
Error codes
If a model call fails, see Error messages 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 |
|



















