Model API

P-Video 2

Fast 5 to 20 second videos from a prompt or a start image, at 720p or 1080p, 24 or 48 fps, with sound and an optional last frame. Draft mode renders a cheaper preview to check an idea first.

Model id

Use this in every request
p-video-2

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",
  "input": {
    "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", "quote_id": "QUOTE_ID", "input": {"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
NameTypeDescription
inputImagearray of image URLs
Optional: First frame for image-to-video.

Default: []

promptrequiredstring
Required: Describe the video to generate, or the motion to apply to the input image if provided
durationstring (enum)
Required: Length of the generated video. An input audio longer than this is trimmed to this length

Default: 5

One of: 5, 10, 15, 20

resolutionstring (enum)
Required: Output resolution

Default: 720p

One of: 720p, 1080p

aspectRatiostring (enum)
Required for text to video. Ignored when an input image is provided

Default: 16:9

One of: 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1

lastFrameImagearray of image URLs
Optional: Reference image for the last frame of the video

Default: []

fpsstring (enum)
Optional: Frames per second of the generated video

Default: 24

One of: 24, 48

draftstring (enum)
Optional. Draft mode: faster, lower quality preview instead of full quality

Default: false

One of: true, false

promptUpsamplingstring (enum)
Optional. Enhance the prompt before generation

Default: true

One of: true, false

saveAudiostring (enum)
Optional. Save the video with audio

Default: true

One of: true, false

seedstring
Optional. Random seed. Set for reproducible generation

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

  • 720p · 5 s$0.20/ video
  • 720p · 10 s$0.40/ video
  • 720p · 15 s$0.60/ video
  • 720p · 20 s$0.80/ video
  • 720p · draft · 5 s$0.12/ video
  • 720p · draft · 10 s$0.24/ video
  • 720p · draft · 15 s$0.36/ video
  • 720p · draft · 20 s$0.48/ video
  • 1080p · 5 s$0.40/ video
  • 1080p · 10 s$0.80/ video
  • 1080p · 15 s$1.19/ video
  • 1080p · 20 s$1.59/ video
  • 1080p · draft · 5 s$0.24/ video
  • 1080p · draft · 10 s$0.48/ video
  • 1080p · draft · 15 s$0.72/ video
  • 1080p · draft · 20 s$0.96/ video

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