# P-Video-Edit

> Run P-Video-Edit by pruna online or via API. From $0.025 per second, no setup.

**URL:** https://inference.sh/apps/pruna/p-video-edit
**Last updated:** 2026-09-02

---

Edit videos from text prompts with optional reference images. Up to 15s input, standard or draft quality.

- app: `pruna/p-video-edit`
- maker: [pruna](https://inference.sh/apps/pruna.md)
- category: [video](https://inference.sh/apps/category/video.md)
- input → output: video → video
- tasks: [video to video](https://inference.sh/apps/tag/video-to-video.md)
- price: $0.025-$0.045/sec output video; draft: $0.025/sec, standard: $0.045/sec
- runs via: api, javascript and python sdk, belt cli, mcp

## p-video-edit API Guide

### About
edit videos from text prompts with optional reference images. up to 15s input, standard or draft quality.

### 1. Calling the API

#### Install the Client

```bash
pip install inferencesh
```

#### Setup Your API Key
Set `INFERENCE_API_KEY` as an environment variable. Get your key from settings → api keys.

```bash
export INFERENCE_API_KEY="inf_your_key"
```

#### Run and Get Result

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])


result = client.run({
        "app": "pruna/p-video-edit@5e5yntpe",
        "input": {
            "video": "https://example.com/file.png",
            "prompt": "prompt"
        }
    })

print(result["output"])
```

#### Stream Live Updates

```python
import os
from inferencesh import inference

client = inference(api_key=os.environ["INFERENCE_API_KEY"])


## stream=True yields updates as they arrive
for update in client.run({
        "app": "pruna/p-video-edit@5e5yntpe",
        "input": {
            "video": "https://example.com/file.png",
            "prompt": "prompt"
        }
    }, stream=True):
    if update.get("progress"):
        print(f"progress: {update['progress']}%")
    if update.get("output"):
        print(f"output: {update['output']}")
```

### 2. Authentication
The API uses API keys for authentication. See the authentication docs for detailed setup instructions.

### 3. Files

#### Automatic Upload

```python
## local file paths are automatically uploaded
result = client.run({
    "app": "pruna/p-video-edit@5e5yntpe",
    "input": {
        "image": "/path/to/local/image.png",  # detected & uploaded
        "audio": "https://example.com/audio.mp3",  # url passed through
    }
})
```

#### Manual Upload

```python
## upload and get a hosted URL
file = client.files.upload("/path/to/file.png")
print(file.uri)  # https://cloud.inference.sh/...
```

### 4. Schema

#### Input
- **video** (string) *required*: Source video to edit (.mp4). Maximum length: 15 seconds.
- **prompt** (string) *required*: Text prompt describing the edit, e.g. 'Replace the sky with a sunset'.
- **images** (array): Optional reference image(s) for identity or style guidance (1-4 images, jpg/png/webp).
- **prompt_upsampling** (boolean): Enhance the edit prompt with an LLM.
- **draft** (boolean): Draft mode: faster, lower-quality preview.
- **save_audio** (boolean): Preserve audio from the source video.
- **seed** (integer): Random seed for reproducible generation.

#### Output
- **seed** (integer): Seed used for generation.
- **video** (string): Edited video.

## other video apps

- [Grok Imagine Video 1.5](https://inference.sh/apps/xai/grok-imagine-video-1-5.md): $0.08/sec 480p, $0.14/sec 720p, $0.25/sec 1080p; $0.01/input image
- [MiniMax H3 Max](https://inference.sh/apps/falai/minimax-h3-max.md): $0.08/sec (768P), $0.05/sec (480P)
- [Mirage Avatar X](https://inference.sh/apps/mirage/avatar-x.md): $0.175/sec
- [Seedance 2.5](https://inference.sh/apps/bytedance/seedance-2-5.md): $6.40–$11.70/M tokens, varies by output resolution and visual input
- [Seedance 2.5 Studio](https://inference.sh/apps/bytedance/seedance-2-5-studio.md): $6.40–$11.70/M tokens, varies by output resolution and visual input

## faq

### how much does P-Video-Edit cost?

$0.025-$0.045/sec output video; draft: $0.025/sec, standard: $0.045/sec. you pay per run from your inference shell credits. no subscription is required.

### how do I run P-Video-Edit via api?

call pruna/p-video-edit with the javascript or python sdk, the rest api, or `belt app run pruna/p-video-edit` from a terminal. the api reference on this page lists every input.

### who makes P-Video-Edit?

P-Video-Edit is made by pruna and runs on inference shell. every pruna app is listed at https://inference.sh/apps/pruna.

### can my agent use P-Video-Edit?

yes. agents call it as a tool through the inference shell mcp server (https://api.inference.sh/mcp), the belt cli or the sdk, and pay per run like you do.

### what are the alternatives to P-Video-Edit?

other video apps on inference shell include Grok Imagine Video 1.5, MiniMax H3 Max, Mirage Avatar X, Seedance 2.5. they run through the same api, so switching is a one-line change.
