p-video-edit

Edit an existing video from a text prompt, optionally guided by reference images

Overview

p-video-edit takes a source video and a text prompt, then returns an edited video. Optional reference images guide identity or style. Input video maximum length is 15 seconds.

Rate Limit: 50 requests per minute

Category: Video Editing

Pricing: billed per second of the returned video ($0.045 standard, $0.025 draft).

ConfigurationPrice
standard (draft=false)0.045$ per second of output video
draft (draft=true)0.025$ per second of output video

Quickstart

Upload your source video

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/source-video.mp4"

Create an edited video

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-video-edit' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "prompt": "Replace the sky with a sunset"
    }
  }'

Synchronous request

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-video-edit' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "prompt": "Replace the sky with a sunset",
      "draft": true
    }
  }'

Optional reference images

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/reference-image.png"
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-video-edit' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "prompt": "Replace the person with the reference",
      "images": [
        "https://api.pruna.ai/v1/files/reference-image-def456"
      ]
    }
  }'

Parameters

Required Parameters

ParameterTypeDescription
videostring (URI)Input video to edit. Maximum length: 15 seconds
promptstringText prompt describing the edit

Optional Parameters

ParameterTypeDefaultDescription
imagesarraystring URIOptional reference image(s) for reference-guided editing. Up to 4 images. Supports jpg, jpeg, png, webp
prompt_upsamplingbooleantrueUse prompt upsampling to enhance the edit prompt
draftbooleanfalseDraft mode. Faster, lower-quality preview. Billed at $0.025 per second
save_audiobooleantrueSave the video with audio
seedintegerrandomRandom seed. Set for reproducible generation