Guide
P-Video 2 Pro Replace Guide: Swap the Person in a Video with 1–2 Photos
Capabilities, input requirements, API calls, pricing and tips
- Model
- p-video-2-pro-replace
On this page
P-Video 2 Pro Replace is Pruna AI's person-swap video model. Give it a source video and 1–2 photos of people, and it keeps the original motion, camera, scene and sound while replacing the person on screen with the person in the photo. This guide covers what it does, how to call it, what it costs, and when to pick a different model.
What it does
- One video and one photo are enough: the only required inputs are the source
video_urland the person photos inimage_urls. No avatar training needed. - Up to two people:
image_urlstakes 1–2 photos (jpg, jpeg, png or webp): one for a single person, or one per person for two people. - Everything else comes from the source: motion, camera movement, scene and length all follow the source video.
keep_audiois on by default, so the output keeps the original sound; set it tofalseto drop it. - Five resolutions: 480p, 768p, 1080p, 2k and 4k, default 768p, keeping the source aspect ratio.
- Optional prompt:
prompt(up to 1,000 characters) describes how to place the people from the photos into the scene. You can leave it empty.
Input requirements
- Source video: MP4, MOV or WebM, 2–30 seconds. Videos outside that range are rejected at submit time with no charge; trim longer footage into clips of 30 seconds or less first.
- Person photos: 1–2 HTTPS links.
- The content safety filter is always on. Content that violates the policy fails with
CONTENT_POLICY_VIOLATIONand is fully refunded.
How to call it
Submit an async task, then poll with the returned taskId:
curl https://api.hiapi.ai/v1/tasks \
-H "Authorization: Bearer $HIAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "p-video-2-pro-replace",
"input": {
"video_url": "https://example.com/source.mp4",
"image_urls": ["https://example.com/person.jpg"],
"resolution": "768p",
"keep_audio": true
}
}'
curl https://api.hiapi.ai/v1/tasks/<taskId> \
-H "Authorization: Bearer $HIAPI_KEY"
When the task succeeds, output holds the video URL. The output is as long as the source video.
Pricing
Billed by output video length; partial seconds are not charged. One or two photos cost the same:
- 480p: $0.0358/s
- 768p: $0.0715/s
- 1080p: $0.0858/s
- 2k: $0.1000/s
- 4k: $0.1286/s
For example, a 10-second 768p video costs about $0.72, and 30 seconds at 480p about $1.07. 30 seconds are held at submit time; after completion you pay for the actual video length and the rest is returned. Failed tasks are fully refunded.
Getting better results
- Use a source video where the person is clearly visible and moves smoothly, and photos with a clear front-facing face and even lighting.
- Check the result with a short 480p clip first, then render the final at a higher resolution.
- To keep results consistent, pass a
seed(an integer from 0 to 2147483647) with the same inputs.
When to pick something else
- Changing the style, scene or camera: this model only swaps the person and follows the source for everything else. Use a video editing model instead.
- No source video, just a portrait and a script: use P-Video 2 Pro Avatar from the same series to make a talking video.
To try it, open the HiAPI Playground, upload a short video and a photo of a person.
Related articles
View all articles →-
Guide
Ideogram V3 Character Edit for E-commerce Product Images via the hiAPI API
A developer guide to consistent subjects, clean background swaps, and a working hiAPI request
10 min read -
Guide
Using happyhorse-1.1/reference-to-video via the HiAPI API: Prompt Recipes and a Short-Form Video Workflow
A developer's guide to organizing reference images, wording identity-preserving prompts, and pacing short-form clips through HiAPI
10 min read -
Guide
Using qwen-image-2.1-pro for E-commerce Product Images: API Usage and Prompt Recipes
An end-to-end developer guide: transparent PNGs, image editing, text rendering and copy-paste prompts with curl and Python requests
10 min read