---
title: "p-video-replace"
url: "https://docs.api.pruna.ai/guides/models/p-video-replace"
image: "https://docs.api.pruna.ai/_og/d/c_Ocean.takumi,title_p-video-replace,props_eyJ0aGVtZSI6eyJtb2RlIjoibGlnaHQiLCJjb2xvcnMiOnsicHJpbWFyeSI6IiM3YzNhZWQifX19,p_Ii9ndWlkZXMvbW9kZWxzL3AtdmlkZW8tcmVwbGFjZSI,s_afpG7qs_geGBWAe-.png"
---

# p-video-replace

Replace people in a source video using identity reference images

## [Overview](#overview)

p-video-replace takes a source RGB video and one or more identity reference images, then places the referenced person or people into the video while preserving the source motion and audio.

**Rate Limit:** 50 requests per minute

**Category:** Video Replacement

**Pricing:**

| Configuration | Price                            |
| :------------ | :------------------------------- |
| 720p          | 0.03$ per second of output video |
| 1080p         | 0.06$ per second of output video |

## [Quickstart](#quickstart)

### [Upload your source video](#upload-your-source-video)

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

### [Upload one or more reference images](#upload-one-or-more-reference-images)

```bash
curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: YOUR_API_KEY" \
  -F "content=@/path/to/reference-image.png"
```

### [Create a replacement video](#create-a-replacement-video)

```bash
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-video-replace' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "images": [
        "https://api.pruna.ai/v1/files/reference-image-def456"
      ],
      "resolution": "720p",
      "target_fps": "original",
      "instruction_prompt": "Place the reference person into the video while preserving the original motion."
    }
  }'
```

### [Synchronous request](#synchronous-request)

```bash
curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Model: p-video-replace' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "images": [
        "https://api.pruna.ai/v1/files/reference-image-def456"
      ]
    }
  }'
```

## [Parameters](#parameters)

### [Required Parameters](#required-parameters)

| Parameter | Type            | Description                                                              |
| :-------- | :-------------- | :----------------------------------------------------------------------- |
| video     | string (URI)    | Source RGB video (.mp4). Used as the motion and audio source             |
| images    | arraystring URI | Identity reference image(s), from 1 to 3 images, to place into the video |

### [Optional Parameters](#optional-parameters)

| Parameter              | Type    | Default    | Description                                                                      |
| :--------------------- | :------ | :--------- | :------------------------------------------------------------------------------- |
| turbo                  | boolean | false      | Turbo mode: faster generation for slightly lower quality                         |
| resolution             | string  | "720p"     | Target resolution. Options: "720p", "1080p"                                      |
| save_audio             | boolean | true       | Save the video with audio                                                        |
| ignore_audio           | boolean | false      | Ignore source audio during generation. If save_audio is true, the source audio is still saved with the final video |
| target_fps             | string  | "original" | Target FPS for the working video. Options: "original", "24", "48"                |
| instruction_prompt     | string  | ""         | Further instruction on how to place people from the reference images into the scene |
| seed                   | integer | random     | Random seed. Set for reproducible generation                                     |
| disable_safety_checker | boolean | false      | Disable safety checker for generated videos                                      |