Pruna AI P Video 2 Pro Reference To Video API Documentation

Pruna AI P Video 2 Pro Reference To Video API Documentation

Playground

Try it on WaveSpeedAI!

Pruna P-Video-2-Pro Reference-to-Video generates reference-guided videos from image, video, and audio inputs, supporting flexible multimodal guidance for consistent subjects, motion, visual style, and creative video production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

P-Video-2 Pro Reference-to-Video generates videos from a text prompt with multimodal reference guidance. Combine reference images, video clips, optional audio, and opening or ending keyframes to control subjects, appearance, motion, scene direction, and the start or end of the generated sequence.


Why Choose This?

  • Multimodal reference guidance
    Combine images, videos, and optional audio references in the same generation workflow.

  • Opening and ending keyframes
    Use start_image or end_image to guide how the generated video begins or ends.

  • Multiple visual references
    Use up to 9 images in total, including first- and last-frame images.

  • Video reference support
    Add up to 3 reference videos for motion, appearance, or scene guidance.

  • Optional audio references
    Add up to 3 audio references for additional sound or performance guidance.

  • Speed and cost modes
    Choose speed for faster generation or cost when lower generation price is preferred.

  • 480p and 768p output
    Select the resolution that fits your quality and cost requirements.


Parameters

ParameterRequiredDescription
promptYesText description of the desired video, including scene, action, camera movement, and how supplied references should be used.
imagesConditionalReference image URLs. Up to 9 images are supported in total when combined with start_image and end_image.
videosConditionalUp to 3 reference video URLs. Combined reference-video duration supports up to 15 seconds.
audiosNoOptional reference audio URLs. Supports up to 3 inputs with a combined duration of up to 15 seconds. Audio cannot be used as the only reference type.
keep_audioNoKeep the supplied audio as the output soundtrack instead of using it only as a reference. Default: false. Requires exactly one file in audios when enabled.
start_imageNoOptional opening keyframe image URL. Counts toward the 9-image total limit.
end_imageNoOptional ending keyframe image URL. Counts toward the 9-image total limit.
durationNoRequested output duration in seconds. Range: 5–15. Default: 5.
resolutionNoOutput resolution: 480p or 768p. Default: 768p.
modeNoGeneration mode: speed or cost. Default: speed.
aspect_ratioNoOptional output aspect ratio: 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, or 1:1. Leave empty to automatically adapt to the input references.
prompt_upsamplerNoPrompt enhancement mode: off, turbo, or max. Default: off.
seedNoOptional random seed for generation.

prompt is required.

At least one of the following visual reference inputs must also be provided:

  • images
  • videos
  • start_image
  • end_image

audios can provide reference guidance or, with keep_audio=true, the output soundtrack. Audio cannot be used as the only reference input.


How to Use

  1. Add visual references — Provide at least one image, video, first-frame image, or last-frame image.
  2. Add audio optional — Supply reference audio for sound or performance guidance. To keep an audio file as the soundtrack, provide exactly one file and enable keep_audio.
  3. Write the prompt — Describe the desired scene, motion, camera behavior, and the role of each reference.
  4. Choose duration — Select an output length from 5 to 15 seconds.
  5. Choose resolution — Select 480p or 768p.
  6. Choose generation mode — Use speed for faster generation or cost for lower-priced generation.
  7. Choose aspect ratio — Leave empty to automatically adapt to the input references, or select a supported layout.
  8. Configure prompt enhancement optional — Select off, turbo, or max.
  9. Set seed optional — Use a fixed seed when reproducibility is needed.
  10. Submit — Generate and retrieve the completed video.

Pricing

Pricing includes the requested output duration plus any submitted image, video, and audio references.

Output Video

ResolutionSpeed ModeCost Mode
480p$0.020 / second$0.015 / second
768p$0.035 / second$0.025 / second

Reference Images

images, start_image, and end_image use the same per-image rate.

ModePrice per Image
Speed$0.010
Cost$0.005

Reference Videos

ResolutionSpeed ModeCost Mode
480p$0.040 / billed second$0.030 / billed second
768p$0.060 / billed second$0.060 / billed second

Reference-video billing duration is rounded up to the next whole second and capped at 15 seconds in total. The billable duration may also be limited based on the requested output duration and number of reference videos.

Reference Audio

ModePrice per Billed Second
Speed$0.0025
Cost$0.0015

Combined reference-audio billing duration is rounded up to the next whole second and capped at 15 seconds.

Example

A 5-second 480p output with one reference image costs:

ModeCalculationCost
Speed5 × $0.020 + 1 × $0.010$0.110
Cost5 × $0.015 + 1 × $0.005$0.080

aspect_ratio, prompt_upsampler, keep_audio, and seed do not add separate charges. Supplied audio is still billed at the audio rate above.


Best Use Cases

  • Character-driven video — Use reference images to guide subject appearance and identity.
  • Product and brand videos — Combine product images with scene and motion instructions.
  • Motion-guided generation — Use reference videos to guide movement, pacing, or camera behavior.
  • Start-and-end-frame workflows — Control the opening or ending state with dedicated keyframes.
  • Multi-reference scenes — Combine several visual references into one generated sequence.
  • Audio-guided generation — Add reference audio alongside visual references for additional guidance.
  • Creative prototyping — Compare different references, modes, resolutions, and prompt directions.

Pro Tips

  • Give each reference a clear role in the prompt instead of relying on the model to infer how it should be used.
  • Use visually consistent references when character or product continuity matters.
  • Use start_image when the opening composition must be controlled.
  • Use end_image when the final pose, framing, or scene state matters.
  • Avoid conflicting instructions between the prompt and supplied keyframes.
  • Use 480p for lower-cost testing before generating at 768p.
  • Use cost mode when minimizing generation cost is more important than using the speed-oriented mode.
  • Keep reference videos focused on the motion or visual behavior you want to transfer.

Notes

  • prompt is required.
  • Audio alone cannot satisfy the reference requirement.
  • At least one image, video, first-frame image, or last-frame image must be provided.
  • images, start_image, and end_image share a combined maximum of 9 images.
  • Up to 3 reference videos are supported.
  • Up to 3 reference audio inputs are supported when keep_audio is off (the default). Enable keep_audio with exactly one audio file to use it as the output soundtrack.
  • With keep_audio=true, shorter audio plays first and generated audio fills the remainder; longer audio is trimmed. If its duration is within one second of duration, the video length follows the audio.
  • Reference-video and reference-audio duration are each limited to a combined maximum of 15 seconds.
  • Output duration supports 5–15 seconds and defaults to 5.
  • resolution defaults to 768p.
  • mode defaults to speed.
  • Leave aspect_ratio empty to automatically adapt to the input references.
  • prompt_upsampler defaults to off.
  • The returned video duration may differ slightly from the requested duration.

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result

set -euo pipefail

export WAVESPEED_API_KEY="your-api-key"

REQUEST_BODY=$(cat <<'JSON'
{
  "prompt": "A cinematic ocean wave at sunrise, highly detailed",
  "duration": 5,
  "resolution": "768p",
  "mode": "speed",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "off",
  "keep_audio": false
}
JSON
)

# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  -X POST "https://api.wavespeed.ai/api/v3/pruna-ai/p-video-2-pro/reference-to-video" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -H "Content-Type: application/json" \
  -d "${REQUEST_BODY}")

TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
  printf 'Submission response did not contain a prediction id
' >&2
  exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"

# 2. Poll until the prediction finishes.
while true; do
  RESPONSE=$(curl --silent --show-error --fail-with-body \
    "${RESULT_URL}" \
    -H "Authorization: Bearer ${WAVESPEED_API_KEY}")
  RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
  STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')

  case "${STATUS}" in
    completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
    failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
    *) sleep 2 ;;
  esac
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes1 ~ unlimited charactersDescribe the video using the uploaded references.
imagesarray<string>No-0 ~ 9 itemsOptional reference images. Up to 9 images including first and last frames.
videosarray<string>No-0 ~ 3 itemsOptional reference videos. Up to 3 clips, 15 seconds combined.
audiosarray<string>No-0 ~ 3 itemsOptional reference audio clips. Up to 3 clips, 15 seconds combined.
start_imagestringNo--Optional opening keyframe image.
end_imagestringNo--Optional ending keyframe image.
durationintegerNo55 ~ 15Requested output duration in seconds.
resolutionstringNo768p480p, 768p-
modestringNospeedspeed, cost-
aspect_ratiostringNo-16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1Optional output aspect ratio. Leave empty to automatically adapt to the input references.
prompt_upsamplerstringNooffoff, turbo, max-
keep_audiobooleanNofalse-Use the supplied audio as the soundtrack. Requires exactly one audio file.
seedintegerNo---

Conditional constraints

  • When keep_audio is true: audios is required; audios must have exactly 1 item.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<string | object>Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model.
data.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.