# P-Video-2

> Run P-Video-2 by pruna online or via API. $0.025/sec 720p, $0.015/sec 720p draft, $0.05/sec 1080p, $0.03/sec 1080p draft, no setup.

**URL:** https://inference.sh/apps/pruna/p-video-2
**Last updated:** 2026-10-23

---

Text-to-video and image-to-video up to 1080p and 20s, with audio conditioning, last-frame control and 24/48 fps. Built on LTX-2.

- app: `pruna/p-video-2`
- maker: [pruna](https://inference.sh/apps/pruna.md)
- category: [video](https://inference.sh/apps/category/video.md)
- input → output: text → video, image → video
- tasks: [text to video](https://inference.sh/apps/tag/text-to-video.md), [image to video](https://inference.sh/apps/tag/image-to-video.md)
- price: $0.025/sec 720p, $0.015/sec 720p draft, $0.05/sec 1080p, $0.03/sec 1080p draft
- runs via: api, javascript and python sdk, belt cli, mcp

## p-video-2 API Guide

### About
text-to-video and image-to-video up to 1080p and 20s, with audio conditioning, last-frame control and 24/48 fps. built on ltx-2.

### 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-2@57vg1206",
        "input": {
            "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-2@57vg1206",
        "input": {
            "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-2@57vg1206",
    "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
- **prompt** (string) *required*: Text description for video generation.
- **image** (string): Input image for image-to-video (jpg, png, webp). When set, aspect_ratio is ignored.
- **last_frame_image** (string): Reference image for the last frame.
- **audio** (string): Audio to condition the video (flac, mp3, wav). The video takes the audio's length; duration is ignored.
- **duration** (integer): Video duration in seconds (1-20). Leave empty to let the model pick the length from the prompt.
- **resolution** (string): Video resolution: 720p or 1080p.
- **fps** (integer): Frames per second: 24 or 48.
- **aspect_ratio** (string): Aspect ratio. Ignored when an input image is provided.
- **draft** (boolean): Faster, lower-quality preview at a lower price.
- **save_audio** (boolean): Include audio in the output video.
- **prompt_upsampling** (boolean): Enhance the prompt before generation.
- **seed** (integer): Random seed for reproducible generation.
- **disable_safety_filter** (boolean): Disable the safety filter for prompts and input images.

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

## other video apps

- [VACE](https://inference.sh/apps/pruna/vace.md): $0.40/video
- [P-Video-Animate](https://inference.sh/apps/pruna/p-video-animate.md): $0.03/sec 720p, $0.06/sec 1080p
- [P-Video-Upscale](https://inference.sh/apps/pruna/p-video-upscale.md): Std: $0.01/sec 720p, $0.02 1080p, $0.04 2k, $0.08 4k; high fps 2x
- [P-Video-2-Pro-Avatar](https://inference.sh/apps/pruna/p-video-2-pro-avatar.md): $0.02/sec 480p, $0.04/sec 768p, $0.06/sec 1080p, $0.08/sec 2k, $0.12/sec 4k
- [P-Video-2-Pro-Reference](https://inference.sh/apps/pruna/p-video-2-pro-reference.md): Output: cost $0.015-$0.105/sec, speed $0.02-$0.115/sec. Ref video: $0.03-$0.06/sec. Ref img: $0.005/img. Ref audio: $0.0015-$0.0025/sec

## faq

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

$0.025/sec 720p, $0.015/sec 720p draft, $0.05/sec 1080p, $0.03/sec 1080p draft. you pay per run from your inference shell credits. no subscription is required.

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

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

### who makes P-Video-2?

P-Video-2 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-2?

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-2?

other video apps on inference shell include VACE, P-Video-Animate, P-Video-Upscale, P-Video-2-Pro-Avatar. they run through the same api, so switching is a one-line change.
