Model API
P-Video 2 Pro Avatar
Turn one portrait and a speech recording or a typed script into a lip-synced talking video. The video runs as long as the speech, from 1 second to 3 minutes, at 480p or 768p and 24 fps. Priced per second of speech.
Model id
p-video-2-pro-avatarRun 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": "p-video-2-pro-avatar",
"input": {
"inputImage": [
"https://example.com/input.png"
],
"prompt": "A red ceramic cup on a wooden table, soft morning light"
}
}'
# 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": "p-video-2-pro-avatar", "quote_id": "QUOTE_ID", "input": {"inputImage":["https://example.com/input.png"],"prompt":"A red ceramic cup on a wooden table, soft morning light"}}'
# 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 |
|---|---|---|
inputImagerequired | array of image URLs | Required. One clear portrait used as the first frame. JPG, PNG or WebP, up to 20 MB. It sets the aspect ratio of the video. |
script | string | Use a script or a speech recording. The exact words the avatar speaks, up to about 3 minutes of speech. The longest likely reading is held and you pay for the actual length. |
inputAudio | array of image URLs | Use a speech recording or a script. The speech the avatar lip-syncs to, 1 second to 3 minutes, MP3 or WAV. The video matches its length and the price follows it. Used instead of the script. |
voice | string (enum) | Voice that reads the script. Not used with a speech recording. |
voiceLanguage | string (enum) | Language of the script. Not used with a speech recording. |
voicePrompt | string | Optional. Tone, pacing, accent and emotion for the script. Not spoken. Not used with a speech recording. |
prompt | string | Optional. Describe what the video should show. Defaults to "The person is talking." |
resolution | string (enum) | Required. Output resolution. The video is always 24 fps. |
promptUpsampling | string (enum) | Optional. Adds the scene's own motion from the portrait (rain, lights, background, body movement) after your prompt. Off uses the prompt exactly. |
seed | string | Optional. Random seed. Leave empty for a new result each time; set it to repeat one. |
Output
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"outputs": [
{ "type": "video", "url": "https://…", "mime_type": "video/mp4", "thumbnail_url": "https://…" }
]Pricing
- 480p$0.04/ second
- 768p$0.07/ second
The exact charge for your input comes from a quote. How charges settle