Model API
Live Portrait
Transfer expression from a video to a portrait.
Model id
live-portrait/imageThis 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
| Name | Type | Description |
|---|---|---|
image_urlrequired | string (image URL) | URL of the image to be animated |
blink | number | Amount to blink the eyes |
eyebrow | number | Amount to raise or lower eyebrows |
wink | number | Amount to wink |
pupil_x | number | Amount to move pupils horizontally |
pupil_y | number | Amount to move pupils vertically |
aaa | number | Amount to open mouth in 'aaa' shape |
eee | number | Amount to shape mouth in 'eee' position |
woo | number | Amount to shape mouth in 'woo' position |
smile | number | Amount to smile |
rotate_pitch | number | Amount to rotate the face in pitch |
rotate_yaw | number | Amount to rotate the face in yaw |
rotate_roll | number | Amount to rotate the face in roll |
flag_pasteback | boolean | Whether to paste-back/stitch the animated face cropping from the face-cropping space to the original image space. |
flag_do_crop | boolean | Whether to crop the source portrait to the face-cropping space. |
flag_do_rot | boolean | Whether to conduct the rotation when flag_do_crop is True. |
flag_lip_zero | boolean | Whether to set the lip to closed state before animation. Only takes effect when flag_eye_retargeting and flag_lip_retargeting are False. |
dsize | integer | Size of the output image. |
scale | number | Scaling factor for the face crop. |
vx_ratio | number | Horizontal offset ratio for face crop. |
vy_ratio | number | Vertical offset ratio for face crop. Positive values move up, negative values move down. |
output_format | string (enum) | Output format |
Output
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"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