Guide
P-Video 2 Pro Replace Developer Guide: Capabilities, Pricing, and Integration
How to integrate Pruna AI's video-to-video person replacement model, control cost per second, and avoid the request shapes it rejects
On this page
What P-Video 2 Pro Replace Actually Does
P-Video 2 Pro Replace is a video-to-video model. It is not a text-to-video generator, and approaching it as one is the fastest way to get rejected requests and disappointing output.
The input contract is simple to describe: you supply a source video plus one or two reference images of the person or people you want to appear in that footage. The model takes the motion, scene, camera movement, and audio from the source video and renders new footage with the referenced people placed into it. The output is a single video.
Three consequences follow from that design, and they shape everything else in this guide:
- Output length always follows the source. You cannot ask for a longer or shorter clip. If your source is a few seconds long, your output is a few seconds long.
- The source video is the creative spine. Framing, cuts, camera motion, and pacing come from the footage you provide. The reference images only determine who appears in it.
- Person replacement is the job. The reference images are descriptions of people to place into the scene, not style references or scene-setting material.
This makes the model a good fit for workflows where you already have footage you want to keep — a performance you need recast, a shot you want localized with different on-camera talent, or a scene where the person in frame needs to change without reshooting. It is a poor fit for generating a video from a written description with no source footage.
The route on HiAPI exposes this as the p-video-2-pro-replace entity with the video-to-video capability. The official provider is Pruna AI, and everything below uses the unified HiAPI request shape, so you do not need separate credentials or a different client for this model family.
Required Inputs and the Request Contract
Two fields are required. If either is missing or malformed, the request fails before any rendering happens.
video_url
An HTTPS URL pointing at the source video. The video must be MP4, MOV, or WebM and must be between 2 and 30 seconds long. Requests with a shorter or longer video are rejected — this is a hard boundary, not a soft guideline. The source video supplies the motion, scene, camera, and audio for the output, and it also defines the output duration.
Serve the file over HTTPS from storage you control or a signed URL that stays valid long enough for the render to complete. A URL that works in your browser but expires in a few minutes is a common source of intermittent failures in batch jobs.
image_urls
An array of 1 to 2 HTTPS image URLs of the person or people to place into the video. The accepted formats are jpg, jpeg, png, and webp.
The semantics of the array are worth spelling out, because they are easy to misread:
- One item means one person is placed into the scene.
- Two items means two people, with one picture each. Two images are not two angles of the same person.
Sending more than two URLs is outside the contract (maxItems=2), and an empty array fails minItems=1. If you are replacing a single person but your pipeline happens to have several candidate photos, pick exactly one before sending the request.
A minimal request
In the HiAPI style, the smallest valid call provides the two required fields and nothing else:
{
"video_url": "https://your-bucket.example.com/source.mp4",
"image_urls": ["https://your-bucket.example.com/person.jpg"]
}
With only these fields, the model follows the source video directly, keeps the original audio, and renders at the default resolution tier. Everything else is optional and covered in the next section.
Tuning the Output: Prompt, Resolution, Audio, and Seed
The optional parameters give you control over placement instructions, output resolution, audio retention, and reproducibility. Each has a default, and the defaults are sensible enough that many first integrations never touch them.
prompt
A string of up to 1000 characters describing how the people from the reference images should be placed into the scene. It is optional. Leave it empty and the model simply follows the source video's existing composition and motion.
Use it when the default placement is not what you want — for example, to constrain where a person lands in frame or how they relate to the existing scene. Keep it focused: this is a placement instruction, not a scene description, and long prose tends to add ambiguity rather than control.
resolution
An enum of 480p, 768p, 1080p, 2k, or 4k, defaulting to 768p. The aspect ratio of the source video is preserved at every tier; only the pixel dimensions change. Official per-second rates are $0.0358 (480P), $0.0715 (768P, the default), $0.0858 (1080P), $0.10 (2K), and $0.1286 (4K). Higher resolution costs more, which is the subject of the next section, so choose the lowest tier that meets your delivery requirement rather than defaulting upward out of caution.
keep_audio
A boolean that defaults to true. The source video's audio is carried into the output unless you explicitly turn it off. If you are recasting a performance but keeping the original dialogue or music, the default is exactly what you want. If you plan to lay in your own track downstream, set it to false so you are not paying to carry audio you will discard.
seed
An integer between 0 and 2147483647 that makes runs reproducible. Omit it for varied output; set it when you need to iterate on a prompt or resolution and want a stable baseline. In a review workflow, storing the seed used for an approved render lets you regenerate a comparable result later.
A tuned request
{
"video_url": "https://your-bucket.example.com/source.mp4",
"image_urls": [
"https://your-bucket.example.com/person-a.jpg",
"https://your-bucket.example.com/person-b.png"
],
"prompt": "Place both people side by side, matching the source framing.",
"resolution": "1080p",
"keep_audio": true,
"seed": 123456
}
How Per-Second Tier Pricing Maps to Budget
Billing for this model is per second and scales with the resolution tier you select. The unit is the second of output, and because output length always follows the source video, the number of seconds you are billed for is determined by the input clip, not by a parameter you set.
The tier structure is straightforward: 480p is the cheapest per second, and the per-second rate rises with each step up through 768p, 1080p, 2k, and 4k. 768p is both the default and a middle tier, which means an untuned request sits in the middle of the price range rather than at the bottom.
Two practical consequences for budgeting:
- Cost is multiplicative. A clip's total cost is roughly its duration in seconds multiplied by the per-second rate for its tier. Doubling the length of your source doubles the cost at the same tier. Moving from 480p to the top tier multiplies the per-second rate by several times.
- Resolution is your main cost lever. For a fixed set of source clips, choosing a lower tier reduces cost proportionally. If your delivery target is a social feed or a small embedded player, rendering at the highest tier wastes budget on pixels that will be downscaled anyway.
The current published rates for each tier live in the pricing panel on the model page — check there before you commit to a batch size, since rates can change and this guide deliberately does not bake numbers into your planning spreadsheet. Use the panel as the source of truth and treat this section as the structure: per second, tiered by resolution, duration-driven.
A useful habit is to compute cost per finished clip rather than cost per second. If your pipeline renders several candidates per shot and you keep one, your effective cost per delivered clip is the per-second rate times the source duration times the number of attempts.
Integration Flow and Where Requests Break
A reliable integration is mostly a validation problem. The rendering itself is a single call; the failures happen before it.
Pre-flight checklist
Run these checks client-side before you send anything:
- Both required fields present.
video_urlandimage_urlsare non-optional. A missing either one is an immediate rejection. - Source duration is within 2–30 seconds. Probe the file's duration with a media tool, do not trust filename metadata. Clips outside the window are rejected, and this is the single most common batch failure.
- Source format is MP4, MOV, or WebM. Transcode anything else before upload.
- Image count is exactly 1 or 2. Not zero, not three.
- Image formats are jpg, jpeg, png, or webp.
- Every URL is HTTPS and reachable. Test with a HEAD request from the same network your worker uses; signed URLs that expire mid-queue are a classic source of flaky jobs.
- Prompt length is within 1000 characters.
- Resolution is one of the five enum values. Lowercase and uppercase forms are specified as
480p,768p,1080p,2k,4k— normalize user input rather than passing through whatever a form produced. - Seed, if set, is within 0 to 2147483647.
Pipeline shape
A robust flow looks like this: ingest the source video, transcode to an accepted format, probe duration, reject early if out of range, upload both video and reference images to durable storage, generate long-lived signed URLs, then submit the job with a seed you record. Store the request payload alongside the output so a failed or unsatisfactory render can be reproduced exactly.
Where requests actually break
In practice, the failure modes cluster into a few buckets:
- Contract violations — missing fields, three images, an unsupported image format, a prompt over the character limit.
- Duration violations — clips just under 2 seconds or just over 30 seconds, often from trimming tools that leave a frame of slop at each end.
- Transfer failures — HTTPS URLs that 404, redirect to HTTP, or require authentication your worker does not send.
The first two are deterministic and cheap to catch. The third is the one that bites in production, so validate reachability rather than assuming an upload succeeded.
When to Choose This Model Over Alternatives
Choose P-Video 2 Pro Replace when the footage is the asset and the person is the variable. That covers recasting a performance without reshooting, localizing content for different on-camera talent, and updating a scene where replacing the person is cheaper than re-staging the shot. The reference-image input makes it a person-replacement tool specifically, not a general video editor.
It is the wrong tool when you have no source footage. If your starting point is a written description, you need a text-to-video approach; this model will not generate a scene from nothing, and its duration is inherited from a source clip you must already have. It is also a poor fit when you need output longer than 30 seconds in a single pass — the source ceiling caps you, so plan to work in segments if your deliverable is longer.
A few decision heuristics help:
- You have footage and want a different person in it — this model.
- You have footage and want a different look, not a different person — a style or transformation approach is a better match.
- You have nothing and want a video — text-to-video.
- You need exact reproducibility across runs — this model supports a seed, which many creative video tools do not, so it is a reasonable choice for review-heavy workflows.
Before committing, check the model page to confirm the current capability set and pricing tier structure, since both are the inputs to your build-versus-buy decision. If person replacement in existing footage is the job, the P-Video 2 Pro Replace model page is the place to start the integration.
Related articles
View all articles →-
Guide
Tripo H3.1 Now Available: Parameters, Pricing, and Usage for Image-to-3D, Multiview-to-3D, and Text-to-3D
Outputs GLB models and preview images, billed per run starting at $0.15
-
Guide
fibo-2.0 Image-to-Image Prompt Recipes: Copy-Paste Prompts for Multi-Reference Edits
A practical recipe book for multi-reference editing, subject fidelity, and style consistency
11 min read -
Guide
Veo 3.1 Image-to-Video Prompt Recipes: Copy-Paste Templates for Developers
First-frame descriptions, cinematic camera and lighting phrasing, native audio cues, and negative prompts you can reuse
9 min read