P-Video 2 Pro Replace API

by Pruna AI

Replace the person in a clip using one or two portraits

pruna-ai/p-video-2-pro-replace/video-edit
P-Video 2 Pro Replace AI Image Generator online
  • Up to 4K
  • Up to 2 reference images
  • Video Face Swap

About P-Video 2 Pro Replace

Replace the person in a clip using one or two portraits.

Call it with the model name pruna-ai/p-video-2-pro-replace/video-edit on POST /jobs/createTask, from $0.06.

Introduction

P-Video 2 Pro Replace from Pruna AI takes existing footage and one or two reference photos to change its cast. Start with an MP4, MOV or WebM clip lasting 1 to 120 seconds and a photo for each replacement. Obtain permission for every likeness and confirm your rights to the photos before submitting. Do not use celebrities, public figures, acquaintances or images you lack rights to. The model page asks you to accept a consent notice before your first run.

Pruna says the edit preserves camera movement, framing, background, other people, timing and motion while the new person follows the original performance. The source determines duration and aspect ratio; neither has a separate setting. In our tests, 5.04-second and 2.00-second inputs returned those same durations as MP4 files at 24 fps. The reference can change clothing and hair along with the face.

Key features

  • One or two replacements: A single photo targets the main person. Two photos map from left to right unless your prompt assigns them differently.
  • Source footage up to 120 seconds: Videos may arrive at up to 8K. Anything after the 120-second mark is cut.
  • Five output choices: 480p and the default 768p are generated directly. Pruna upscales the 768p result for 1080p, 2K and 4K, adding processing time rather than new model detail.
  • Separate sound controls: keep_original_audio retains the soundtrack by default. ignore_source_audio is off by default so the model can use sound to guide lip movement, as Pruna describes.
  • Drawn reference tested: In our tests, a comic heroine’s hair, jacket and cargo trousers carried into the cycling footage.
  • Measured processing examples: In our tests, a 2-second source took 47 seconds at 480p and 160 seconds at 4K. A 5-second source at 768p took 60–90 seconds. These are observations rather than completion guarantees.

Request parameters

ParameterRequiredDescription
ignore_source_audioNoGenerate without listening to the source sound, so lips do not follow it. The soundtrack can still be kept. Default: false
keep_original_audioNoKeep the source clip’s own sound. Default: true
promptNoDescribe what you want to make.
reference_image_urlsYesPictures of the people, outfits or places the result should keep.
resolutionNoChoose an available output size. 480p · 768p · 1080p · 2k · 4k · Default: 768p
seedNoUse the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647
video_urlYesThe clip to work on.

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per second
resolution 480p$0.06
resolution 768p$0.12
resolution 1080p$0.144
resolution 2K$0.168
resolution 4K$0.216

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

Use cases

  • Preview an approved cast change: Pair an actor’s permitted photo with an existing scene to review a different appearance against the recorded performance.
  • Assign a cycling pair: Use two photos and identify each rider by shirt color, then compare the assignments while checking the street and tram against the source.
  • Try a character in a dance routine: Supply one character reference for a solo dancer and review the changed hair and outfit through the studio performance.

Prompt guide & pro tips

  • Keep a solo request simple: For one person on screen, leave the prompt empty; the working instruction is “replace the main person.” Our solo dance example needed no prompt.
  • Map both references clearly: Identify source clothing and photo order, such as “blue-shirt rider: first photo; red-shirt rider: second photo.” This overrides automatic left-to-right matching.
  • State what should remain: Add a short instruction such as “keep the other people and street unchanged.” Pruna describes the source scene as the basis for the edit.
  • Choose audio behavior separately: For “keep the dialogue and follow its timing,” leave keep_original_audio on and ignore_source_audio off. For retained sound without audio-guided lips, turn ignore_source_audio on.
  • Compare one change per run: Use an integer seed while testing a direction such as “second photo replaces the rider in red.” A seed supports controlled comparisons without promising identical frames.
  • Review before choosing an upscale: Check the default 768p result for a direction such as “preserve the studio setting.” Choose 1080p, 2K or 4K when you want an upscaled version and can allow more processing time.

API quick start

Call the P-Video 2 Pro Replace API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
  2. Send the request. POST /jobs/createTask with model pruna-ai/p-video-2-pro-replace/video-edit and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "pruna-ai/p-video-2-pro-replace/video-edit",
  "input": {
    "video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
    "reference_image_urls": [
      "https://media.popnow.ai/influencer/examples/ava.webp"
    ],
    "resolution": "768p"
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

P-Video 2 Pro Replace API questions

How much does the P-Video 2 Pro Replace API cost?

P-Video 2 Pro Replace costs $0.06 per second. Prices by option: 480p $0.06 per second, 768p $0.12 per second, 1080p $0.144 per second, 2K $0.168 per second. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for P-Video 2 Pro Replace in the API?

Put pruna-ai/p-video-2-pro-replace/video-edit for Video Face Swap in the model field of POST /jobs/createTask.

Which people can appear in my reference photos?

Get permission from the person whose likeness you plan to use and confirm your rights to the photo. Do not use celebrities, public figures, acquaintances or photos you lack rights to. Present the result truthfully so viewers understand that the cast was changed. The model page requires acceptance of a consent notice before the first run.

Will the edit change the face or the entire person?

It replaces the person as a whole. In our tests, the reference supplied hair and clothing as well as the face: a white shirt and a comic character’s jacket and cargo trousers appeared in the cycling scene.

How do I assign two photos to two people?

Provide one photo per replacement, up to two photos. Without directions, the pair is matched from left to right. To choose the assignments yourself, identify each source person and the corresponding photo in the prompt. With a single photo, the main person is the target.

Does the model generate 1080p, 2K and 4K directly?

No. Pruna generates 480p and 768p directly; 1080p, 2K and 4K upscale the 768p result. The added pixels and sharpness do not represent extra detail generated by the model. These options also take longer to finish.

Can I retain the soundtrack and matching lip movement?

Pruna says the replacement’s lips follow the original audio when the model listens to it. Keep ignore_source_audio off for that behavior. keep_original_audio is on by default; in our tests, the riders’ soundtrack retained the source loudness. Turn keep_original_audio off for a file with no audio track. Turning ignore_source_audio on stops audio from guiding the lips, even if the soundtrack is retained.

What are the limits of the P-Video 2 Pro Replace API?

Resolutions: 480p · 768p · 1080p · 2K · 4K; Reference images: 2; Prompt length (characters): 2,000; Largest upload: 90 MB. Requests outside these limits are rejected before anything is charged.

Can I try P-Video 2 Pro Replace without writing code?

Run P-Video 2 Pro Replace in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.

More about P-Video 2 Pro Replace