Live Portrait
1.5 credits per compute second, rounded up
ae_live_portrait
Animate a portrait photo using the facial expressions and lip movements from a driving video, with optional controls for pose, eyes, and mouth.
1.5 credits per compute second, rounded up
Pricing
Successful calls are charged 1.5 credits per second of actual processing time, rounded up to whole seconds.
1.5 credits per compute second, rounded up
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | No parameter description. | — |
request_body.aaa | number | No | Amount to open mouth in 'aaa' shape | 0 |
request_body.eee | number | No | Amount to shape mouth in 'eee' position | 0 |
request_body.woo | number | No | Amount to shape mouth in 'woo' position | 0 |
request_body.wink | number | No | Amount to wink | 0 |
request_body.blink | number | No | Amount to blink the eyes | 0 |
request_body.dsize | integer | No | Size of the output image. | 512 |
request_body.scale | number | No | Scaling factor for the face crop. | 2.3 |
request_body.smile | number | No | Amount to smile | 0 |
request_body.eyebrow | number | No | Amount to raise or lower eyebrows | 0 |
request_body.pupil_x | number | No | Amount to move pupils horizontally | 0 |
request_body.pupil_y | number | No | Amount to move pupils vertically | 0 |
request_body.vx_ratio | number | No | Horizontal offset ratio for face crop. | 0 |
request_body.vy_ratio | number | No | Vertical offset ratio for face crop. Positive values move up, negative values move down. | -0.125 |
request_body.image_url | string | Yes | URL of the image to be animated | — |
request_body.video_url | string | Yes | URL of the video to drive the lip syncing. | — |
request_body.batch_size | integer | No | Batch size for the model. The larger the batch size, the faster the model will run, but the more memory it will consume. | 32 |
request_body.rotate_yaw | number | No | Amount to rotate the face in yaw | 0 |
request_body.flag_do_rot | boolean | No | Whether to conduct the rotation when flag_do_crop is True. | true |
request_body.rotate_roll | number | No | Amount to rotate the face in roll | 0 |
request_body.flag_do_crop | boolean | No | Whether to crop the source portrait to the face-cropping space. | true |
request_body.rotate_pitch | number | No | Amount to rotate the face in pitch | 0 |
request_body.flag_lip_zero | boolean | No | Whether to set the lip to closed state before animation. Only takes effect when flag_eye_retargeting and flag_lip_retargeting are False. | true |
request_body.flag_relative | boolean | No | Whether to use relative motion. | true |
request_body.flag_pasteback | boolean | No | Whether to paste-back/stitch the animated face cropping from the face-cropping space to the original image space. | true |
request_body.flag_stitching | boolean | No | Whether to enable stitching. Recommended to set to True. | true |
request_body.flag_eye_retargeting | boolean | No | Whether to enable eye retargeting. | false |
request_body.flag_lip_retargeting | boolean | No | Whether to enable lip retargeting. | false |
request_body.enable_safety_checker | boolean | No | Whether to enable the safety checker. If enabled, the model will check if the input image contains a face before processing it. The safety checker will process the input image | false |
Invocation example
Copy the request and explore its response example.
POST
/agent-api/v1/tool/executeX-Api-KeySubmit first, then query with the returned task_id until the task completes.
Request coderequest.sh
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_live_portrait' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"dsize": 512,
"enable_safety_checker": false,
"flag_do_crop": true,
"flag_lip_zero": true,
"flag_pasteback": true,
"flag_relative": true,
"flag_stitching": true,
"image_url": "https://agentearth.ai/fileserver/file/c8f2ef2d-9038-4e26-a661-d848a0b445ab.png",
"scale": 2.3,
"video_url": "https://agentearth.ai/fileserver/file/bb702780-3509-4c1d-b459-bea30eef6ae3.mp4"
}
}
}'Response exampleresponse.json
{
"description": "task accepted; poll the result via query_tool with this task_id",
"query_tool": "ae_get_result",
"status": "created",
"task_id": "e8215c70-d796-4587-815d-9074e02505ee"
}

