Tutorial
P-Video 2 Pro Replace Practical Guide: 5 High-Value Video Use Cases
A developer walkthrough of person-insertion video-to-video, from input constraints to per-second cost control
このページの内容
What P-Video 2 Pro Replace Actually Does
Official per-second rates are $0.0358 (480P), $0.0715 (768P, the default), $0.0858 (1080P), $0.10 (2K), and $0.1286 (4K). The official source-video limit is 2–30 seconds, and output length follows that source.
P-Video 2 Pro Replace is a video-to-video model. It does not generate a scene from scratch. Instead, it takes an existing clip and keeps everything about it that makes it a video — the motion, the framing, the camera path, and (by default) the audio — while replacing the person on screen with someone supplied by you as a still image.
That contract shapes everything downstream. The source video is the director; your reference image is the casting choice. If the source clip has a person turning, gesturing, walking toward the camera, or sitting mid-interview, the output keeps that blocking and substitutes the identity. The model does not invent new camera moves, and it does not extend the clip; the output length follows the source video exactly.
The model is published by Pruna AI and exposed through a single HiAPI.ai route with the capability video-to-video. Two inputs are required: a video_url pointing to the source clip, and image_urls holding one or two photos of the person or people to insert. Everything else — prompt, keep_audio, resolution, seed — is optional control.
When to pick this over text-to-video
Text-to-video is the right tool when you have no footage and need the model to invent motion, scene and camera. P-Video 2 Pro Replace is the right tool when you already own a clip you trust and only the person needs to change. That distinction matters for teams because re-shooting is usually the expensive part of video production, not rendering. A clip that has already been lit, framed, approved and cleared for use stays intact; only the identity varies.
Where it fits in a pipeline
Treat the route as a rendering step in an existing asset pipeline: your source clips live in storage, your person references come from a media library or an upload flow, and the route returns the composited video. Because the source video drives timing and audio, downstream steps such as captioning, trimming, or per-market publishing usually do not need to change when you swap the presenter.
Inputs That Decide Success or Failure
In practice, most failed calls to this route are input validation failures, not model failures. The request is small, so build the checks before you send anything.
video_url
Required. Must be an HTTPS URL pointing to an MP4, MOV or WebM file. The critical constraint is duration: 2 to 30 seconds. Requests with a shorter or longer video are rejected outright. Validate duration on your side before the call — reading the container metadata during upload is far cheaper than burning a request and waiting for a rejection. The output length always follows this video, so duration is also your pricing input.
image_urls
Required. An array with minItems=1 and maxItems=2. One URL means one person inserted into the scene. Two URLs mean two people, one picture each — not two photos of the same person. Accepted formats are jpg, jpeg, png and webp, and the URLs must be HTTPS. Since the array cap is two, reject any batch job that tries to pass a third reference at the validation layer rather than letting it fail at request time.
prompt
Optional, maxLength=1000. Use it when placement needs guidance — for example which side of frame a person should occupy, or how two people should be arranged relative to the source blocking. Leaving it empty is a valid and often correct choice: the output simply follows the source video. Keep prompts short and spatial; the model is not re-authoring the scene.
keep_audio
Boolean, defaults to True. The source video's audio is retained in the output. Set it to False when you plan to lay in your own voiceover, localized dialogue, or music bed downstream. Decide this per pipeline, not per request, so outputs stay consistent.
resolution
Enum of 480p, 768p, 1080p, 2k, 4k; default 768p. Aspect ratio of the source is preserved, so resolution changes pixel count, not framing. Higher resolution costs more — which is why resolution is the lever you tune in iteration, not something to maximize by default.
seed
Integer from 0 to 2147483647. Use it when you need reproducibility for an approved take. Store the seed alongside the output so a variant can be regenerated later. Note that the seed stabilizes the run; it does not change the source motion, which is fixed by the input video.
A simple pre-flight validator that checks HTTPS scheme, container type, duration bounds, image count, extension, prompt length and enum membership will eliminate nearly every avoidable error.
Use Case 1: Swapping Presenters in Existing Footage
The most direct use case is the one the model was built for: you have a clip that was shot once, and you need a different person in it. An onboarding video recorded by a departing employee, a product walkthrough delivered by a contractor, a testimonial filmed with talent whose usage rights have lapsed — all of these are candidates.
The workflow is short. Upload the approved source clip, confirm it falls inside the 2–30 second window, supply a clear photo of the replacement person as image_urls, and leave prompt empty unless the source blocking needs correction. Keep keep_audio at its default if the original delivery, ambient sound or on-location audio should survive; flip it off if the original voice must be replaced.
Why motion preservation matters here
A presenter swap fails when the replacement looks pasted on. Because the source video supplies the motion, the head turns, hand gestures, posture shifts and camera parallax stay physically consistent — the new person inherits the performance rather than being animated over it. This is the reason to prefer a video-to-video route over generating a fresh presenter clip: the performance is real footage, not synthesized timing.
Practical notes
Pick a reference image where the face is unobstructed and reasonably front-facing; a photo taken in similar lighting to the source scene reduces visible mismatch. If the source clip is longer than 30 seconds, split it at natural cut points and process each segment separately rather than stretching the limit. And keep the original clip archived — you will want to re-run the swap when talent changes again, and the source is the constant in that equation.
Use Case 2: Localized Demo and Training Videos
Once you can swap a presenter reliably, the economics of localization change. Instead of booking a shoot per market, per region or per internal team, you keep one approved source performance and produce variants by changing only the person reference — and, where the pipeline calls for it, the audio.
The single-motion, many-presenters pattern
The pattern is one source video branching into several outputs. The motion, scene and camera are shared across every branch, which means every variant has identical timing, identical framing and identical product demonstration. Reviewers approve the demonstration once; the remaining decisions are about who appears in it.
Two ways to localize
If the source audio is language-neutral (music, ambient, on-screen graphics carrying the message), keep keep_audio at its default and vary only the reference image. If the audio must be replaced, set keep_audio to False and lay in your localized voiceover downstream — the output video then serves as the visual track. Keeping this decision consistent across a batch makes the assembled variants predictable.
Operational notes
Because duration is fixed by the source, per-clip cost is identical across variants at the same resolution tier, which makes budgeting a multiplication rather than an estimate. Batch your variants by resolution: render the whole set at the default 768p for review, and re-render only the variants that get approved at the final tier. Store the seed per approved variant so an unexpected change request months later can reproduce the approved take instead of re-rolling it. You can review the route and its parameter schema on the P-Video 2 Pro Replace model page before wiring up the batch job.
Use Case 3: Two-Person Scenes from Two Stills
The image_urls array accepts up to two entries, which unlocks a second class of work: scenes that need two specific people, each supplied as a single photo. The source video still provides the blocking and camera; the two references supply the identities.
This is a common need in training and sales content — a host and a guest, a manager and a new hire, a two-person product demo — where the original footage exists but the on-camera people need to change, or where the scene was shot with stand-ins.
Where prompt earns its keep
With two references, placement ambiguity goes up, and this is the case where prompt is genuinely useful. Describe which person should occupy which part of the frame relative to the source blocking, and keep the instruction spatial and brief. The prompt does not re-author the scene; it guides how the two reference people are fitted into the existing composition. Stay within the 1000-character limit and avoid narrative instructions — the motion is already decided by the source video.
Constraints to respect
Two images means exactly one picture per person, not two angles of the same face. Both URLs must use HTTPS and be jpg, jpeg, png or webp. If your scene needs three or more people, this route is not the right fit — the array caps at two, and exceeding it is a validation error, not a soft limit.
Practical notes
Choose reference photos with roughly the same framing as the roles they fill: a chest-up portrait for a seated interview role, a fuller shot for a standing role. When the source has the two people interacting — passing an object, shaking hands — keep the prompt focused on identity placement and let the source motion carry the interaction. Render a first pass at a lower tier to confirm both identities read correctly before committing to a final resolution.
Use Case 4: Brand-Safe Reusable Campaign Assets
Campaign assets get re-cut constantly: a new market, a new quarter, a new spokesperson, a new length. The expensive part is not the render — it is re-approving a creative that has drifted. This route supports a lock-and-replay workflow that keeps approved variants stable.
The lock-and-replay pattern
The pattern is simple: for each approved variant, persist the complete request — video_url, image_urls, prompt, keep_audio, resolution and seed. That tuple is your asset definition. When someone asks for the same spot again, you replay the tuple instead of re-deciding parameters, and the output stays consistent with what legal, brand and regional reviewers signed off on.
Why seed plus fixed prompt matters
seed gives you reproducibility for a given run, and a fixed prompt removes the largest remaining source of variance — wording drift. Together with an immutable source video, they turn an ad hoc generation into a reproducible build step. Treat prompt text as versioned configuration rather than something typed per request; if the prompt changes, that is a new variant requiring new approval.
Brand-safety guardrails
Pin the source clips in storage with checksums so a re-upload cannot silently change the motion. Restrict reference images to an approved media library rather than allowing arbitrary uploads. Keep keep_audio fixed per campaign so audio rights decisions do not get accidentally re-litigated. And render final approved assets at the resolution tier the delivery channel requires — not higher — so the stored asset matches the published one.
Practical notes
Record the seed next to every approved asset in your CMS or asset tracker; a seed that is not stored is effectively lost. Run a periodic replay test on one or two archived variants to confirm the pipeline still reproduces them after any integration change.
Use Case 5: Prototype-to-Final Pipelines
Because billing is per second and resolution is the cost lever, prototyping and final delivery should not run at the same tier. A staged pipeline keeps iteration cheap and only pays for the take you actually ship.
Stage one: draft pass
Validate the source duration, then render at 480p — the entry tier — to answer the questions that do not need detail: did the wrong person get swapped, did the placement read correctly, is the audio behavior right. Review these drafts in a contact-sheet style rather than full screen; you are checking correctness, not quality. Iterate prompt wording and reference image choice here, where each second of output is cheapest.
Stage two: approval
Lock the parameters that passed review — reference images, prompt, audio choice, and the seed if you want the take to be reproducible. Approval at draft resolution is a decision about content, not pixels, so it transfers cleanly to the final render.
Stage three: final render
Re-run the approved configuration at the delivery tier — 1080p, 2k or 4k depending on the channel. Because the source video and parameters are fixed, the final render is the same take at higher fidelity. Note that the aspect ratio follows the source, so the final render will not change framing; you are only raising pixel count.
Guardrail
Make the tier an explicit parameter in your job spec, not a default. A pipeline that silently renders every draft at the top tier is the most common way to overspend on this route, and it is entirely avoidable: the draft/final split is a configuration change, not an architecture change. Log the tier alongside the output so cost attribution per project stays accurate.
Cost Control by Resolution Tier
Billing on this route is per second, and the per-second rate depends on the resolution tier you select. Cost per clip is therefore a simple product: output seconds (which equal source video seconds) multiplied by the rate for the chosen tier. There is no separate charge dimension to model beyond duration and tier.
The tiers
The official resolution enum maps to distinct per-second rates, rising with resolution: 480p is the entry tier, then 768p (the default), then 1080p, 2k and 4k at the top. Check the live pricing panel for current figures before you commit to a budget — rates are maintained there rather than in this guide.
What actually drives the number
Two variables, and only two:
- Duration. The output length follows
video_url, constrained to 2–30 seconds. Doubling clip length doubles cost at any tier. - Tier. Moving up a resolution tier raises the per-second rate. The default
768pis a deliberate middle ground.
Because duration is capped at 30 seconds, the worst case per request is bounded and easy to compute before you send it. Build a small estimator in your job submission path: read the source duration, multiply by the selected tier rate, and surface the estimate before the call.
Rules of thumb
Render drafts at 480p, review, then re-render only approved takes at the delivery tier. Do not render at 4k for a channel that displays at 1080p — the extra pixels are invisible and the rate is at its highest. For multi-variant work (localization, presenter swaps), cost is variants × duration × tier rate, which makes batch budgeting arithmetic rather than guesswork. And always validate duration before submission: a rejected request due to a 31-second source wastes time even when it does not waste budget.
See the model page for the current tier list and parameter schema.
Integration Checklist Before You Ship
Run through this list before putting the route into production; each item maps to a failure mode that is cheaper to prevent than to debug.
Input validation
- Confirm
video_urluses HTTPS and points to MP4, MOV or WebM. - Read and enforce the 2–30 second duration bound at upload time; reject out-of-range clips before submission.
- Enforce
image_urlslength of 1 or 2, HTTPS scheme, and jpg/jpeg/png/webp extensions. - Validate
promptagainst the 1000-character limit, and reject narrative-style prompts that try to re-author motion. - Validate
resolutionagainst the enum480p/768p/1080p/2k/4krather than passing free text.
Parameter policy
- Decide
keep_audioper pipeline and keep it fixed across a batch so outputs stay consistent. - Choose an explicit default resolution for each job type; do not inherit a top tier by accident.
- Define a seed policy: capture and store the seed for every approved take, and treat prompt text as versioned configuration.
Cost and operations
- Add a per-request cost estimate (duration × tier rate) to your job submission path and log the tier with each output.
- Archive source videos immutably so replays cannot drift.
- Replay one archived variant after any integration change to confirm reproducibility.
Failure handling
Distinguish validation errors from model errors in your retry logic: validation failures should surface to the user immediately, while transient failures can retry. Cap retries and log the full request tuple — minus credentials — so any output can be traced back to its inputs.
With validation, tier discipline and seed storage in place, P-Video 2 Pro Replace becomes a predictable rendering step rather than an experiment. Start from the route details on the P-Video 2 Pro Replace page and build the validator first.
関連記事
すべての記事を見る →-
Tutorial
Seedream 5.5 Practical Guide: 5 High-Value Image Generation Use Cases
A developer-focused walkthrough of real-world image generation patterns, parameters, and cost trade-offs
16 min read -
Tutorial
MiniMax Music 1.5 Practical Guide: 5 High-Value Use Cases for Developers
From prompt and lyrics to format, bitrate, and sample rate: how to ship music generation features that hold up
14 min read -
Tutorial
Lyria 3 Pro Practical Guide: 5 High-Value Music Generation Use Cases
From prompt to production: where text-to-music actually pays off, and how to build it
12 min read