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.

AvatarVideoImage
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.

ParameterTypeRequiredDescriptionDefault
request_bodyobjectYesNo parameter description.—
request_body.aaanumberNoAmount to open mouth in 'aaa' shape0
request_body.eeenumberNoAmount to shape mouth in 'eee' position0
request_body.woonumberNoAmount to shape mouth in 'woo' position0
request_body.winknumberNoAmount to wink0
request_body.blinknumberNoAmount to blink the eyes0
request_body.dsizeintegerNoSize of the output image.512
request_body.scalenumberNoScaling factor for the face crop.2.3
request_body.smilenumberNoAmount to smile0
request_body.eyebrownumberNoAmount to raise or lower eyebrows0
request_body.pupil_xnumberNoAmount to move pupils horizontally0
request_body.pupil_ynumberNoAmount to move pupils vertically0
request_body.vx_rationumberNoHorizontal offset ratio for face crop.0
request_body.vy_rationumberNoVertical offset ratio for face crop. Positive values move up, negative values move down.-0.125
request_body.image_urlstringYesURL of the image to be animated—
request_body.video_urlstringYesURL of the video to drive the lip syncing.—
request_body.batch_sizeintegerNoBatch 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_yawnumberNoAmount to rotate the face in yaw0
request_body.flag_do_rotbooleanNoWhether to conduct the rotation when flag_do_crop is True.true
request_body.rotate_rollnumberNoAmount to rotate the face in roll0
request_body.flag_do_cropbooleanNoWhether to crop the source portrait to the face-cropping space.true
request_body.rotate_pitchnumberNoAmount to rotate the face in pitch0
request_body.flag_lip_zerobooleanNoWhether 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_relativebooleanNoWhether to use relative motion.true
request_body.flag_pastebackbooleanNoWhether to paste-back/stitch the animated face cropping from the face-cropping space to the original image space.true
request_body.flag_stitchingbooleanNoWhether to enable stitching. Recommended to set to True.true
request_body.flag_eye_retargetingbooleanNoWhether to enable eye retargeting.false
request_body.flag_lip_retargetingbooleanNoWhether to enable lip retargeting.false
request_body.enable_safety_checkerbooleanNo 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-Key

Submit 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
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"
}