Este artículo aún no está disponible en tu idioma; mostramos el original.
Blog

Guide

P-Video 2 Pro Avatar Developer Guide: Capabilities, Pricing, and API Integration

How to wire Pruna AI's avatar video model into your product: parameter modes, resolution cost tradeoffs, and integration patterns

Nov 16, 2026 12 min read
Flat woven-band cover art in espresso, oat and brass tones, laid out like a loom diagram for a developer guide.
En esta página
Generated with P-Video 2 Pro Avatar: a single continuous dolly-in, audio-driven lip-sync avatar shot demonstrating studio-grade lighting and stable identity.

What P-Video 2 Pro Avatar Actually Does

P-Video 2 Pro Avatar is a video generation model from Pruna AI that turns a still portrait into a talking-head video. On the API side it is exposed as a single route with four capability labels attached: image-to-video, audio-to-video, lip-sync, and avatar-video. Those labels describe what the model can do, not four separate endpoints — you send one request and receive one video back.

In practice the route collapses into two input paths that converge on the same output:

  • Portrait + audio. You supply image_url and audio_url. The model animates the portrait so the lip movement matches the supplied speech track.
  • Portrait + script. You supply image_url and script. The model synthesizes the speech with a built-in text-to-speech voice, then animates the portrait to that generated audio.

Either way, image_url is the only required parameter and it always serves as the first frame of the output. That has a direct consequence for quality: the framing, lighting, and sharpness of your portrait determine the baseline quality of every frame that follows. A soft or oddly cropped source image will produce a soft or oddly cropped video, no matter which voice settings you choose.

The capability set makes the model a good fit for narrated explainers, localized marketing clips, training material, and any product surface where a human face speaking on camera adds clarity. If your use case is a talking avatar driven by recorded narration, the audio_url path is the natural entry point. If you want the platform to generate the voice, the script path removes an entire recording step from your pipeline.

Two Input Modes: Audio-Driven vs. Built-in TTS

The most important design decision when integrating this model is which of the two input modes you commit to. They are mutually exclusive in effect, and the precedence rule is absolute.

Audio-driven mode

You provide audio_url: an HTTPS URL pointing to a speech audio file. The video length matches the audio length — there is no separate duration parameter to fight with. The audio file must be reachable by the service over HTTPS; signed object-storage URLs work well here.

The critical rule: when audio_url is present, script, voice, voice_language, and voice_prompt are all ignored. This is convenient — you can leave those fields out entirely — but it also means a stale script in your payload will silently do nothing rather than raise an error. If your request builder always populates every field, make sure it either omits the voice group or that your code does not depend on those parameters in audio mode.

Audio mode is the right choice when you already have produced narration: human-recorded voiceover, a professionally localized track, or audio generated elsewhere in your pipeline where you control prosody and pronunciation.

Built-in TTS mode

Without audio_url, you must supply script — the exact words the avatar speaks. The spoken length of the script sets the video length, up to roughly 3 minutes. You then shape the delivery with three optional parameters: voice (a named speaker from a fixed enum of 30 voices), voice_language (the language the script is written in), and voice_prompt (free-form delivery instructions such as tone or pacing, which are not themselves spoken).

TTS mode is the right choice when you want to generate variants at scale from text — for example, the same messaging rendered with several different voices, or a script that changes per user or per locale.

One limitation shapes your language strategy: the script field does not support Chinese. If your content is Chinese-language, you should produce the audio yourself and use audio-driven mode instead of the built-in TTS path.

Key API Parameters and Their Constraints

The route schema is small, but several fields carry constraints that are easy to trip over on a first request. Here is the full picture.

Required

  • image_url — string, required. HTTPS URL of the portrait of the person who speaks, used as the first frame. Accepted formats: jpg, jpeg, png, webp.

Audio input

  • audio_url — string, optional. HTTPS URL of the speech audio, up to 3 minutes (up to 125 seconds at 4k). The video matches the audio length. When present, it overrides the entire voice group.

Script and voice (TTS mode)

  • script — string, max length 5000. The exact words spoken with the built-in voice, written in the selected voice_language. Chinese is not supported. Required when audio_url is absent. Spoken length sets video length, up to about 3 minutes.
  • voice — string enum, default Zephyr (Female). Thirty named voices are available across male and female speakers, from Zephyr and Puck through Rasalgethi. Ignored when audio_url is present.
  • voice_language — string enum, default English (US). Accepted values: English (US), English (UK), Spanish, French, German, Italian, Portuguese (Brazil), Japanese, Korean, Hindi. Ignored when audio_url is present.
  • voice_prompt — string, max length 1000, default Say the following.. Delivery instructions for the voice — tone, pacing, accent, emotion. Not spoken. Ignored when audio_url is present.

Visual direction and determinism

  • prompt — string, max length 2000, default The person is talking.. Describes how the person looks, moves, and behaves while speaking. This is your main lever for body language and scene direction.
  • resolution — string enum, default 768p. One of 480p, 768p, 1080p, 2k, or 4k. Official per-second rates are $0.0286 (480P), $0.0572 (768P, the default), $0.0858 (1080P), $0.1143 (2K), and $0.1715 (4K).
  • seed — integer, 0 to 2147483647. Random seed for reproducible results.

A minimal valid request therefore needs only image_url plus either audio_url or script. Everything else has a sane default, though the default resolution (768p) and default prompt (The person is talking.) are worth setting explicitly once you know your target output.

Pricing: Resolution Tiers and the Per-Second Bill

Billing for this model is per second of output video, and the rate depends on the resolution tier you request. There are five tiers in the official enum — 480p, 768p, 1080p, 2k, and 4k — and each step up multiplies the per-second rate. The exact numbers change over time and are published on the pricing panel; what matters architecturally is that the rate is linear in seconds and tiered by resolution.

The cost model follows directly:

Estimated cost ≈ per-second rate for your tier × estimated_seconds

That makes estimated_seconds — the length of the output video — the primary variable you control, with resolution as the multiplier on top. Since video length is not a free parameter in either mode (it is derived from the audio length or the spoken length of the script), your cost control points are:

  • Tier selection. Dropping from a high tier to a lower one cuts the per-second rate proportionally. For drafts and internal review, a lower tier is almost always sufficient.
  • Clip length. Trimming a narration track by thirty seconds removes thirty seconds of billed output. This is the cheapest optimization available and it requires no quality tradeoff at all.
  • Retry discipline. Every render is billed per second, so a failed-then-retried generation pays twice. Validate payloads before submitting (see the testing section).

One interaction between the two levers is worth internalizing: the maximum audio length shrinks at the top tier. Audio runs up to 3 minutes generally, but only up to 125 seconds at 4k. So the highest-quality tier is also the one where long-form narration must be split — which conveniently also caps the most expensive single render.

Choosing Resolution and Length for Your Use Case

Resolution is a quality-and-cost dial, and the right setting depends on where the video lands. A rough decision framework:

480p and 768p

Use these for drafts, internal review, and pipeline validation. At the default 768p you get a reasonable preview of framing and lip-sync before committing to a higher tier. 480p is useful when you are iterating on prompt wording or testing a new portrait and just need to see behavior quickly. Neither tier is typically a final delivery format, but both are cheap ways to catch problems early.

1080p

The practical default for most product surfaces: web embeds, in-app avatars, social clips, and standard marketing video. If you are unsure, start here once you have a stable prompt and portrait, and only move up if the output is displayed large.

2k and 4k

Reserve these for large-format display — presentations, broadcast-adjacent material, or anything viewed full-screen on a high-density display. The cost scales with the tier, so these should be a deliberate choice rather than a default. Remember the 4k constraint: audio is capped at 125 seconds, so a long narration needs chunking.

Planning for length

Because video length follows the audio (or the spoken script) rather than a duration parameter, long-form content needs a chunking strategy. Two patterns work well:

  • Segment by scene. Write or record narration in natural paragraphs, render each as a separate clip, and assemble them in your editor or with a video compositing step. This keeps every render inside the length ceiling and lets you re-render only the segment that needs fixing.
  • Downshift the tier for long content. If a single long narration must stay in one piece, render it at a tier whose ceiling accommodates it, and consider whether the display context actually needs the highest tier.

A useful rule of thumb: decide resolution from the display size, then decide clip length from the narration structure, and let chunking absorb any conflict between the two.

Integration Walkthrough and Testing Strategy

The route is available on the HiAPI.ai platform as p-video-2-pro-avatar; the model page at /models/p-video-2-pro-avatar lists the current parameters and pricing tiers. The integration flow is straightforward:

The call flow

  1. Host your inputs. Upload the portrait to object storage and generate an HTTPS URL (signed URLs are fine). If you are in audio mode, do the same for the speech file. Check the format: jpg, jpeg, png, or webp for the image.
  2. Build the payload. Set image_url, then either audio_url or script plus the voice group. Set resolution and prompt explicitly rather than relying on defaults, and pick a seed if you want reproducibility.
  3. Submit and poll. Video generation is asynchronous. Treat the initial call as a job submission and poll or wait for the result rather than expecting a synchronous response. Persist the job identifier so a retry does not accidentally submit a second billed render.
  4. Store the output. Download the resulting video to your own storage immediately; do not assume result URLs are permanent.

Wrap steps 2 through 4 in a single idempotent function keyed by a payload hash. That gives you a natural guard against duplicate submissions.

Reproducible testing

The seed parameter is the key to a workable test strategy. With a fixed seed and all other parameters locked, the same input should produce a consistent render, which turns the model into something you can regression-test.

A practical loop:

  • Create a small fixture set of two or three portraits plus short audio and script samples.
  • Pin seed, resolution, prompt, and the voice settings in a config file.
  • Render the fixtures at 480p on every change to your request builder, and compare outputs for expected drift.
  • Only run higher-tier renders for final acceptance, not on every iteration.

When you are tuning prompt, change one variable at a time against a fixed seed. Because the prompt describes appearance, movement, and behavior during speech, small wording changes can shift body language noticeably — isolating them is the only way to know what caused a difference.

Common Pitfalls and Limits to Design Around

Most first-integration failures come from a short list of constraints. Design around them up front.

Script language support

The built-in TTS path does not support Chinese scripts. If your product serves Chinese-language content, you cannot use the script mode for it — generate or record the audio yourself and switch to audio_url. This is a routing decision, not a workaround: build your request builder so it chooses the mode based on the content language rather than defaulting to TTS.

Silent parameter overrides

When audio_url is present, script, voice, voice_language, and voice_prompt are ignored — not rejected, ignored. If your code path populates all fields by default, you can spend a long time debugging why a voice change had no effect. Make the mode explicit in your payload builder and omit the voice group in audio mode.

Audio length ceilings

The general audio limit is 3 minutes, but it drops to 125 seconds at 4k. Validate audio duration before submitting and reject or chunk anything over the ceiling for the chosen tier. Doing this client-side avoids a billed round trip that cannot succeed.

Portrait quality as a hard dependency

image_url is required and is always the first frame. There is no separate styling stage to rescue a bad source image. Enforce a minimum resolution and a sensible crop at upload time, and prefer well-lit, front-facing portraits.

Retry cost

Renders are billed per output second, so a blind retry after a timeout doubles your cost. Distinguish between a failed submission and a slow job: if the job was accepted, wait for it rather than resubmitting.

Length follows speech, not a parameter

There is no duration knob. If your UI promises a fixed clip length, you must shape the script or audio to hit it. Build a rough duration estimate into your validation step so users are not surprised by a longer or shorter video than the interface implied.

Handled early, these constraints are minor engineering details; left implicit, each one turns into a support ticket. Start from the model page, pin your parameters, and validate before you render.

Artículos relacionados

Ver todos los artículos →

Empieza a crear con artefactos de IA persistentes

Consigue tu API key y llama a modelos de imagen, vídeo y audio a través de una única API basada en tasks.

Leer la documentación de la API