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
-
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 parameters |
Generate an Emoji video
|
Headers |
|
|
Content-Type The content type of the request. Must be |
|
|
Authorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. |
|
|
X-DashScope-Async Enables asynchronous processing. HTTP requests support only asynchronous calls. Must be Important
If this request header is missing, the error "current user api does not support synchronous calls" is returned. |
|
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.
|
|
output Task status and results. |
|
|
request_id Unique request identifier for tracing and troubleshooting. |
|
|
code Error code. Returned only for failed requests. See Error codes. |
|
|
message Detailed error message. Returned only for failed requests. See Error codes. |
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 parameters |
Query task resultsReplace 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
|
Headers |
|
|
Authorization Authenticates the request with a Model Studio API key. Example: Bearer sk-xxxx. |
|
URL path parameters |
|
|
task_id The ID of the task. |
Response parameters |
Task successfulVideo URLs are valid 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 request identifier for tracing and troubleshooting. |
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 |
|



















