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

Use this in every request
p-video-2-pro-avatar

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": "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

Input fields for p-video-2-pro-avatar
NameTypeDescription
inputImagerequiredarray 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.
scriptstring
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.
inputAudioarray 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.

Default: []

voicestring (enum)
Voice that reads the script. Not used with a speech recording.

Default: Zephyr (Female)

voiceLanguagestring (enum)
Language of the script. Not used with a speech recording.

Default: English (US)

One of: English (US), English (UK), Spanish, French, German, Italian, Portuguese (Brazil), Japanese, Korean, Hindi

voicePromptstring
Optional. Tone, pacing, accent and emotion for the script. Not spoken. Not used with a speech recording.
promptstring
Optional. Describe what the video should show. Defaults to "The person is talking."
resolutionstring (enum)
Required. Output resolution. The video is always 24 fps.

Default: 768p

One of: 480p, 768p

promptUpsamplingstring (enum)
Optional. Adds the scene's own motion from the portrait (rain, lights, background, body movement) after your prompt. Off uses the prompt exactly.

Default: true

One of: true, false

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

Job excerpt
"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