Model API

Live Portrait

Transfer expression from a video to a portrait.

Model id

Use this in every request
live-portrait/image

This model has other modes with their own ids: live-portrait.

Run it

Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.

# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "live-portrait/image",
  "input": {
    "image_url": "https://example.com/input.png"
  }
}'

# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
  -H "Authorization: Bearer $RAYWAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"model": "live-portrait/image", "quote_id": "QUOTE_ID", "input": {"image_url":"https://example.com/input.png"}}'

# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
  -H "Authorization: Bearer $RAYWAKE_API_KEY"

Input

Input fields for live-portrait/image
NameTypeDescription
image_urlrequiredstring (image URL)
URL of the image to be animated
blinknumber
Amount to blink the eyes

Default: 0

eyebrownumber
Amount to raise or lower eyebrows

Default: 0

winknumber
Amount to wink

Default: 0

pupil_xnumber
Amount to move pupils horizontally

Default: 0

pupil_ynumber
Amount to move pupils vertically

Default: 0

aaanumber
Amount to open mouth in 'aaa' shape

Default: 0

eeenumber
Amount to shape mouth in 'eee' position

Default: 0

woonumber
Amount to shape mouth in 'woo' position

Default: 0

smilenumber
Amount to smile

Default: 0

rotate_pitchnumber
Amount to rotate the face in pitch

Default: 0

rotate_yawnumber
Amount to rotate the face in yaw

Default: 0

rotate_rollnumber
Amount to rotate the face in roll

Default: 0

flag_pastebackboolean
Whether to paste-back/stitch the animated face cropping from the face-cropping space to the original image space.

Default: true

flag_do_cropboolean
Whether to crop the source portrait to the face-cropping space.

Default: true

flag_do_rotboolean
Whether to conduct the rotation when flag_do_crop is True.

Default: true

flag_lip_zeroboolean
Whether to set the lip to closed state before animation. Only takes effect when flag_eye_retargeting and flag_lip_retargeting are False.

Default: true

dsizeinteger
Size of the output image.

Default: 512

scalenumber
Scaling factor for the face crop.

Default: 2.3

vx_rationumber
Horizontal offset ratio for face crop.

Default: 0

vy_rationumber
Vertical offset ratio for face crop. Positive values move up, negative values move down.

Default: -0.125

output_formatstring (enum)
Output format

Default: jpeg

One of: jpeg, png

Output

A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.

Job excerpt
"outputs": [
  { "type": "image", "url": "https://…", "mime_type": "image/png", "thumbnail_url": "https://…" }
]

Pricing

  • up to$0.60/ run

The exact charge for your input comes from a quote. How charges settle