Image-to-Singing-and-Acting Video – EMO
EMO video generation API reference
Generate animated face videos from portrait images and voice audio. Submit an image and audio file to receive a video with the face animated to match the speech.
This API applies only to the China (Beijing) region. Use an API key from the China (Beijing) region.
How it works
The EMO API uses a two-step asynchronous workflow:
Create a task -- Submit a portrait image and audio file. Receive a task_id immediately.
Query the result -- Poll the task status with the task_id. When the status reaches SUCCEEDED, download the generated video.
Video generation takes several minutes. Task IDs are valid for 24 hours after creation.
Sample input Sample output Portrait: Voice audio: (sample audio) Sample output video Action style strength: style_level set to active.
For more examples, see Performance showcase .
Ensure uploaded images and audio files are legally compliant and you have the necessary permissions for their use.
Prerequisites
Activate the model service, create an API key , and export it as an environment variable.
Process the input image with the EMO image detection API to get face area (face_bbox) and dynamic area (ext_bbox) coordinates. Both are required parameters.
Step 1: Create a task
Submit the portrait image and audio file to create a video generation task. Receive a task_id for Step 2.
Endpoint
POST https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis
Task IDs are valid for 24 hours after creation.
Header Type Required Description X-DashScope-Asyncstring Required Asynchronous processing mode. Set to enable. HTTP requests support only asynchronous processing. Without this header, requests fail with "current user api does not support synchronous calls". Authorizationstring Required Authentication credential in format Bearer {API_KEY} using a Model Studio API key. Example: Bearer sk-xxxx. Content-Typestring Required Request content type. Set to application/json.
Request body
Parameter Type Required Description modelstring Required Model name. Set to emo-v1. inputobject Required Input data containing the image, audio, and bounding box coordinates. See Input parameters . parametersobject Optional Generation settings. See Parameters object .
Parameter Type Required Description image_urlstring Required Portrait image URL. The model crops the image using ext_bbox. The cropped area's aspect ratio determines the output video resolution. See Image requirements . audio_urlstring Required Voice audio file URL for EMO model inference. See Audio requirements . face_bboxarray Required Face area bounding box coordinates in format [x1, y1, x2, y2] (top-left and bottom-right corners). Obtain these from the face_bbox field in the EMO image detection API response. Example: [302, 286, 610, 593]. ext_bboxarray Required Dynamic area bounding box coordinates in format [x1, y1, x2, y2] (top-left and bottom-right corners). Aspect ratio must be 1:1 or 3:4. Obtain these from the ext_bbox field in the EMO image detection API response. Example: [71, 9, 840, 778].
The coordinate origin (0,0) is at the top-left corner of the image. The x-axis extends right and the y-axis extends downward.
Parameters object
Parameter Type Required Default Description style_levelstring Optional normalControls the character's motion amplitude. Allowed values: normal (moderate motion), calm (calm motion), active (active motion).
Image requirements
The aspect ratio of ext_bbox determines the output video dimensions:
1:1 aspect ratio produces a 512 x 512 profile picture video.
3:4 aspect ratio produces a 512 x 704 half-body portrait video.
Minimum side length: 400 pixels.
Maximum side length: 7,000 pixels.
Supported formats: JPG, JPEG, PNG, BMP, and WebP.
The image must be an HTTP or HTTPS URL. Local file paths are not supported.
Audio requirements
Audio must contain clear human voice. For best results, remove background noise and music.
Maximum file size: 15 MB.
Maximum duration: 60 seconds.
Supported formats: WAV and MP3.
The audio must be an HTTP or HTTPS URL. Local file paths are not supported.
Request examples
curl --location 'https://dashscope.aliyuncs.com/api/v1/services/aigc/image2video/video-synthesis' \
--header 'X-DashScope-Async: enable' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY " \
--header 'Content-Type: application/json' \
--data '{
"model": "emo-v1",
"input": {
"image_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20251225/onmomb/emo.png",
"audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250825/aejgyj/input_audio.mp3",
"face_bbox":[302,286,610,593],
"ext_bbox":[71,9,840,778]
},
"parameters": {
"style_level": "normal"
}
}'
Response parameters
Parameter Type Description outputobject Task output information. output.task_idstring ID of the asynchronous task. Use this ID in Step 2 to query the result. Example: a8532587-fa8c-4ef8-82be-xxxxxx. output.task_statusstring Task status after submission. Value: PENDING. request_idstring Unique request ID for tracing and troubleshooting. codestring Error code. Returned only when the request fails. See Error codes . messagestring Error message. Returned only when the request fails. See Error codes .
Response examples
Sample success response
Sample error response
{
"output" : {
"task_id" : "a8532587-fa8c-4ef8-82be-xxxxxx" ,
"task_status" : "PENDING"
},
"request_id" : "7574ee8f-38a3-4b1e-9280-11c33ab46e51"
}
Step 2: Query the result
Use the task_id from Step 1 to poll the task status and retrieve the generated video.
Endpoint
GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
Replace {task_id} with the task ID from Step 1.
Important notes
task_id validity: Task IDs are valid for 24 hours after creation. After expiration, API returns status UNKNOWN.
Task status flow: PENDING → RUNNING → SUCCEEDED or FAILED.
Polling: Video generation takes several minutes. Query API limit: 20 QPS. Poll every 15 seconds or longer.
video_url validity: Video URLs are valid for 24 hours after task success. Download and transfer to permanent storage (e.g., What is OSS?) immediately.
Header Type Required Description Authorizationstring Required Authentication credential in format Bearer {API_KEY} using a Model Studio API key. Example: Bearer sk-xxxx.
URL path parameters
Parameter Type Required Description task_idstring Required Task ID from Step 1. Example: a8532587-fa8c-4ef8-82be-xxxxxx.
Request examples
curl -X GET \
--header "Authorization: Bearer $DASHSCOPE_API_KEY " \
https://dashscope.aliyuncs.com/api/v1/tasks/{ task_id}
Response parameters
Parameter Type Description request_idstring Unique request ID for tracing and troubleshooting. outputobject Task output information. output.task_idstring ID of the queried task. Example: a8532587-fa8c-4ef8-82be-xxxxxx. output.task_statusstring Current task status. See Response examples . output.submit_timestring Time when the task was submitted (UTC+8). Example: 2025-09-11 14:33:38.716. output.scheduled_timestring Time when the task was scheduled to start (UTC+8). Example: 2025-09-11 14:33:53.089. output.end_timestring Time when the task finished (UTC+8). Example: 2025-09-11 14:35:51.541. output.resultsobject Task execution result. Present when task_status is SUCCEEDED. output.results.video_urlstring Generated video URL, valid for 24 hours after task completion. Download and save promptly. Example: http://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/xxx.mp4?Expires=xxxx . output.codestring Error code. Present when task_status is FAILED. See Error codes . output.messagestring Error message. Present when task_status is FAILED. See Error codes . usageobject Resource usage information. Present when task_status is SUCCEEDED. usage.video_durationfloat Duration of the generated video, in seconds. Example: 13.93. usage.video_ratiostring Aspect ratio of the generated video. Value: 1:1 or 3:4.
Task status values
Status Description PENDINGTask is queued, waiting to be processed. RUNNINGTask is being processed. SUCCEEDEDTask completed successfully. video_url is available in the response. FAILEDTask failed. Check output.code and output.message for details. CANCELEDTask was canceled. UNKNOWNTask does not exist or status cannot be determined. Returned when the task_id has expired (after 24 hours).
Response examples
Sample success response
Sample error response
{
"request_id" : "8190395f-ca1b-4703-9656-xxxxxx" ,
"output" : {
"task_id" : "a8532587-fa8c-4ef8-82be-xxxxxx" ,
"task_status" : "SUCCEEDED" ,
"submit_time" : "2025-09-11 14:33:38.716" ,
"scheduled_time" : "2025-09-11 14:33:53.089" ,
"end_time" : "2025-09-11 14:35:51.541" ,
"results" : {
"video_url" : "http://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/xxx.mp4?Expires=xxxx"
}
},
"usage" : {
"video_duration" : 13.93 ,
"video_ratio" : "1:1"
}
}
Billing and rate limits
Pricing
emo-v1 uses pay-as-you-go billing based on generated video duration.
Aspect ratio Resolution Unit price 1:1 512 x 512 USD 0.011469 per second 3:4 512 x 704 USD 0.022937 per second
Cost examples:
A 10-second video at 1:1 aspect ratio costs approximately USD 0.11.
A 30-second video at 3:4 aspect ratio costs approximately USD 0.69.
Rate limits
Limit type Value Task submission QPS 5 Concurrent tasks 1 (excess tasks queued) Task query QPS 20
Error codes
For common error codes and status codes, see Error messages . LivePortrait image detection API reference
The LivePortrait-detect model checks whether input images meet LivePortrait specifications. This document describes how to call the detection API.