Pruna AI P Video Edit API Documentation

Pruna AI P Video Edit API Documentation

Playground

Try it on WaveSpeedAI!

Pruna P-Video-Edit is an instruction-based video editing model for modifying subjects, objects, attributes, and environments in existing videos, with optional reference-image guidance and Draft or Full quality modes. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

Pruna AI P-Video Edit edits an existing video using natural-language instructions. Upload a source video, describe the changes you want, and optionally add reference images to guide identity, appearance, style, object edits, or scene transformation.


Why Choose This?

  • Instruction-based video editing
    Edit videos with natural-language prompts instead of building a manual editing workflow.

  • Flexible visual changes
    Modify attributes, transform objects, adjust environments, or restyle a scene while preserving the source video’s motion and structure.

  • Reference-guided editing
    Add up to 4 reference images to guide identity, appearance, object design, or visual style.

  • Draft and Full modes
    Use Draft mode for faster, lower-cost previews, or Full mode for higher-quality edits.

  • Audio preservation
    Preserve the source video’s audio in the edited result with save_audio.


Parameters

ParameterRequiredDescription
videoYesSource video to edit. Maximum input length: 15 seconds.
promptYesNatural-language instructions describing the requested video changes.
imagesNoOptional reference images for guided editing. Supports up to 4 JPG, JPEG, PNG, or WebP images.
prompt_upsamplingNoExpand and optimize the editing prompt. Default: true.
draftNoEnable faster, lower-cost Draft mode. Default: false.
save_audioNoPreserve the source video’s audio in the result. Default: true.
seedNoRandom seed for reproducible results. If omitted, the upstream model chooses a random seed.

How to Use

  1. Upload a source video — Provide a clip no longer than 15 seconds.
  2. Write the edit prompt — Describe what should change and what should remain consistent.
  3. Add reference images optional — Provide up to 4 images when identity, style, product, or object appearance matters.
  4. Choose Draft or Full mode — Use Draft mode for quick previews or Full mode for higher-quality output.
  5. Choose audio behavior — Keep save_audio enabled when the source audio should be preserved.
  6. Set seed optional — Use a fixed seed when reproducibility is needed.
  7. Submit — Generate the edited video and retrieve the output URL.

Pricing

Pricing is based on the source video duration and selected mode.

Billing duration is rounded up to the next whole second, with a minimum billed duration of 1 second and a maximum billed duration of 15 seconds.

ModePrice per billed second
Full$0.045
Draft$0.025

Example Costs

Input DurationBilled DurationFullDraft
0.5s1s$0.045$0.025
6.13s7s$0.315$0.175
15s15s$0.675$0.375

images, prompt_upsampling, save_audio, and seed do not add separate charges.


Best Use Cases

  • Attribute editing — Change clothing, materials, colors, lighting, or visual traits.
  • Object modification — Replace, transform, add, or restyle objects in a scene.
  • Environment replacement — Move an existing performance into a different location, season, time of day, or visual atmosphere.
  • Reference-guided edits — Use images to guide identity, object appearance, product design, or visual style.
  • Creative iteration — Generate Draft previews before producing a Full-quality result.
  • Social and marketing video edits — Adapt short clips for ads, product showcases, and creative campaigns.

Pro Tips

  • Clearly describe both what should change and what should remain consistent.
  • Use reference images when identity, product details, object design, or style consistency matters.
  • Use Draft mode for fast iteration before running a Full edit.
  • Keep prompts focused on one main edit direction for more stable results.
  • Preserve save_audio=true when the original soundtrack, dialogue, or ambience should remain.
  • Use short, clean source videos with clear subjects and stable motion.
  • Set a fixed seed when comparing prompt or reference-image changes.

Notes

  • video and prompt are required.
  • The input video can be up to 15 seconds long.
  • images is optional and supports up to 4 reference images.
  • Defaults: prompt_upsampling=true, draft=false, and save_audio=true.
  • The completed prediction returns the edited video as a URL in outputs.
  • This endpoint does not expose output resolution, frame rate, duration, output format, or translation controls.

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'
{
  "video": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
  "prompt": "A cinematic ocean wave at sunrise, highly detailed",
  "prompt_upsampling": true,
  "draft": false,
  "save_audio": true
}
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/edit" \
  -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
videostringYes-Source video to edit. The input video can be up to 15 seconds long.
promptstringYes-Natural-language instructions describing the changes to apply to the video.
imagesarray<string>No-0 ~ 4 itemsOptional reference images for guided editing. Supports up to 4 JPG, JPEG, PNG, or WebP images.
prompt_upsamplingbooleanNotrue-Whether the model should expand and optimize the editing prompt.
draftbooleanNofalse-Enable faster, lower-cost Draft mode.
save_audiobooleanNotrue-Preserve the source video's audio in the edited output.
seedintegerNo--Random seed for reproducible results. If omitted, the upstream model generates a random seed.

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.