News icon

Kimi K3 is now available on Runpod

Getting started with Pruna P-Video-Edit using a Public Endpoint

Learn how to edit videos with Pruna P-Video-Edit using Runpod’s public endpoint, Playground, curl, and Python.

Getting started with Pruna P-Video-Edit using a Public Endpoint

P-Video-Edit is Pruna AI’s instruction-driven video editing model. Upload a source video up to 15 seconds long and give one text instruction; the model then produces an edited video. You can also optionally include up to four reference images to support reference-based edits.

Runpod has a public endpoint available for this model. This gives you instant API access to a pre-deployed API for calling this endpoint. You don’t need deployment or infrastructure; all you need is to create an API key and make a request.

How to get started with P-Video-Edit

On Runpod’s Playground

To get started, you can use the Playground. If you click on The Hub, under “Public Endpoints,” you will see a listing for “P-Video-Edit”. You can edit parameters, add your own images, and make the request directly.

Runpod P-Video-Edit Playground showing a prompt, upload fields, and generated SUV video

The response you get back should look like this once it’s completed:

{
  "delayTime": 8607,
  "executionTime": 252132,
  "id": "sync-a574c4ff-2001-4b59-b689-488ea7363ab0-u2",
  "output": {
    "cost": 0.2268,
    "result": "https://image.runpod.ai/p-video/edit/a920b5c19c714e3d9f2af475fbd34049/result.mp4"
  },
  "status": "COMPLETED",
  "workerId": "phsmefxookxvwp"
}

Curl request

To get started making requests with this endpoint, a simple way is to use Curl. Be sure to replace YOUR_API_KEY with your own API key.

curl -X POST https://api.runpod.ai/v2/p-video-edit/run \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -d '{"input":{"prompt":"Add the roof cargo box shown in the reference image to the SUV. Match its shape, matte-black material and proportions. Keep it rigidly attached and correctly aligned to the vehicle roof throughout the camera movement. Preserve the vehicle body, windows, trim, wheels, pedestrian, environment and lighting.","video":"https://image.runpod.ai/test/pruna/p-video-edit/test.mp4","prompt_upsampling":true,"draft":false,"save_audio":true,"seed":0,"images":["https://image.runpod.ai/uploads/907XnLTSFm/f876233c-8d67-45b5-a347-9b063795fe74.png","https://image.runpod.ai/uploads/dWeJxLfk_B/b8fa8e1c-0f75-43c2-9440-4c6ec15c5183.png","https://image.runpod.ai/uploads/qq7zw1TW9m/567cbf13-0745-4e38-879b-f730a00d5d76.png"]}}'

Python

To get started with Python, you can use the requests package. It’s important to note that this model isn’t compatible with OpenAI’s SDK.

import requests

url = "https://api.runpod.ai/v2/p-video-edit/run"

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_API_KEY",
}

payload = {
    "input": {
        "prompt": (
            "Add the roof cargo box shown in the reference image to the SUV. "
            "Match its shape, matte-black material and proportions. Keep it "
            "rigidly attached and correctly aligned to the vehicle roof throughout "
            "the camera movement. Preserve the vehicle body, windows, trim, wheels, "
            "pedestrian, environment and lighting."
        ),
        "video": "https://image.runpod.ai/test/pruna/p-video-edit/test.mp4",
        "prompt_upsampling": True,
        "draft": False,
        "save_audio": True,
        "seed": 0,
        "images": [
            "https://image.runpod.ai/uploads/907XnLTSFm/f876233c-8d67-45b5-a347-9b063795fe74.png",
            "https://image.runpod.ai/uploads/dWeJxLfk_B/b8fa8e1c-0f75-43c2-9440-4c6ec15c5183.png",
            "https://image.runpod.ai/uploads/qq7zw1TW9m/567cbf13-0745-4e38-879b-f730a00d5d76.png",
        ],
    }
}

response = requests.post(url, headers=headers, json=payload)

response.raise_for_status()
print(response.json())

Conclusion

P-Video-Edit is Pruna AI’s instruction-driven video editing model that transforms videos up to 15 seconds using a single text instruction, with optional support for up to four reference images. Be sure to let us know on Discord, in the #built-on-runpod channel, if you build anything with it.

Build what’s next.

Build, train, and scale AI workloads on Runpod with cloud GPUs, Serverless, and Clusters.

Star field background