## Basic model info

Model name: prunaai/p-video-2-pro
Model description: Pruna's highest-quality video model. Generate video from text or images with speed and quality modes, first- and last-frame control, and durations up to 15 seconds.


## Model inputs

- prompt (required): Text prompt for video generation. (string)
- mode (optional): Generation mode: quality, speed, or cost. (string)
- prompt_upsampler (optional): Expand your prompt before video generation. (string)
- image (optional): First-frame reference image. (string)
- last_frame_image (optional): Last-frame reference image. (string)
- duration (optional): Video duration in seconds. (integer)
- resolution (optional): Video resolution. 1080p, 2k and 4k generate at 768p and upscale it (24 fps kept). (string)
- aspect_ratio (optional): Aspect ratio; reference images determine the canvas when provided. (string)
- seed (optional): Random seed for reproducible generation. (integer)
- enable_safety_filter (optional): Check the inputs against the content policy. When off, only the always-on categories (sexual content involving minors, self-harm intent or instructions) are still blocked. (boolean)


## Model output schema

{
  "type": "string",
  "title": "Output",
  "format": "uri"
}

If the input or output schema includes a format of URI, it is referring to a file.


## Example inputs and outputs

Use these example outputs to better understand the types of inputs the model accepts, and the types of outputs the model returns:

### Example (https://replicate.com/p/86582xcvnhrmr0d0n619k8fwh0)

#### Input

```json
{
  "mode": "speed",
  "image": "https://replicate.delivery/pbxt/PoNvQd3plThnhNsGUc8fE4e9OTdk0jcmiOhqLsXjt1mxiTA4/tmp4z1l281s-1.webp",
  "prompt": "Use the provided image as the exact first frame. A velociraptor moves cautiously through an opulent palace salon, looking around alertly, brushing past furniture, then suddenly speeding deeper into the room. Shoot it as one continuous low-angle handheld cinematic shot with warm lighting, subtle motion blur, and tense sound design with soft footsteps, furniture creaks, and low orchestral strings.",
  "duration": 5,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "turbo"
}
```

#### Output

```json
"https://replicate.delivery/xezq/iIGZI9Rryc6iMpqjRFa2FAFiweLCnwzwtFdWO1soGrR1hAnLA/a69858bd-405a-4ad4-b4ea-eda9bf6e9edc.mp4"
```


### Example (https://replicate.com/p/rjykqnm0jsrmw0d0n62tjbyp4c)

#### Input

```json
{
  "mode": "speed",
  "image": "https://replicate.delivery/pbxt/PoNyRUnfchH0vX0MlzepQF9p9YAkMY4x1lDWzWKyxfIWxaiR/tmpiks8b5_e.webp",
  "prompt": "Use the provided image as the exact first frame. Elite sprinters explode from the blocks and race at full speed along a glowing multicolored track suspended above a city at night, with realistic running motion and no game-related elements. Follow them from behind in one continuous low handheld tracking shot with strong motion blur, city lights below, powerful footsteps, breathing, and tense cinematic sound.",
  "duration": 5,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "turbo"
}
```

#### Output

```json
"https://replicate.delivery/xezq/aNlfU0AGmnTfGEZqthG2XQfwRGZdfdePhmW9quXgRTFF1Iw5C/95b2b130-543d-43b7-893b-dbb4196cc993.mp4"
```


### Example (https://replicate.com/p/f8tqgqq511rmy0d0n64t79gczg)

#### Input

```json
{
  "mode": "quality",
  "image": "https://replicate.delivery/pbxt/PoO2z4pRa0RvIq4LGTvP0FBF5YNkxktDOaDkXOiQwRdLyfIY/tmpjo30tiie.webp",
  "prompt": "Use the provided image as the exact first frame.\n\nA dynamic, high-energy cinematic scene in a busy Manhattan street canyon in bright daytime. Giant birds are flying low between the skyscrapers while carrying startled office workers through the air. The central focus is the huge owl in the middle of the frame, with its wings fully spread, lifting a suited businessman upward while he dangles below holding a briefcase. Around them, other oversized birds carry additional commuters: a large goose on the left, a falcon on the right, and a white gull farther right. The scene should feel chaotic, fast, and full of motion.\n\n0.0\u20131.5 seconds:\nThe action begins immediately from the exact first frame. All birds are already in active flight. Their wings beat powerfully, feathers flexing and rippling in the air. The central owl dips slightly forward and then rises, pulling the businessman upward while he swings beneath it, legs kicking and body twisting. His briefcase swings with momentum. The goose on the left beats its wings heavily while the woman hanging below it bounces and sways. Traffic continues moving below them \u2014 taxis, buses, and cars roll through the avenue. Small pedestrians on the sidewalks look tiny in comparison.\n\n1.5\u20133.5 seconds:\nIncrease the motion and chaos. The central owl pushes forward through the avenue with strong wingbeats, making the businessman swing in a wider arc. The falcon on the right glides and then flaps sharply, lifting the businessman beneath it higher for a moment. The white gull swoops slightly upward and outward. The carried people react with fear and surprise, gripping tightly, their coats, ties, and hair blown by the wind. The camera should feel alive: a subtle forward-moving cinematic shot with a slight upward drift, as if following the central owl through the street. Buildings create strong parallax, and traffic below continues flowing.\n\n3.5\u20135.0 seconds:\nThe motion becomes even more dramatic. The central owl gives two strong wingbeats, rising higher and slightly closer to camera, while the dangling businessman swings, stabilizes, then swings again. The other birds also stay in motion: the goose flaps broadly, the falcon banks slightly, and the gull glides across the right edge. Cars below continue moving, sunlight flashes on windshields, and the whole avenue feels alive. End with the birds still in active flight, the central owl dominating the frame, and the dangling commuters still midair in a chaotic but visually readable formation.\n\nCamera\n\nDynamic cinematic shot, starting from the exact first-frame composition. Slight forward tracking movement with a subtle upward drift, mild handheld energy, strong parallax from the tall buildings, and realistic motion in the suspended people and traffic below. No cuts.\n\nMotion priority\n\nVery high motion throughout the entire 5 seconds:\n\npowerful wingbeats from all birds\ndangling commuters swinging and twisting\nloose clothing, ties, and hair moving in the wind\nbriefcases swinging\ncars and buses moving below\nsubtle camera motion and city parallax\nVisual consistency\n\nPreserve the exact city setting, giant birds, suspended office workers, bright daylight, Manhattan avenue composition, and overall realistic cinematic look from the starting image. Keep the central owl as the main focus.\n\nSound design\n\nStrong rushing air, loud wing flaps, traffic noise below, distant horns, bus movement, city ambience, and brief human yelps or startled shouts. No dialogue.\n\nMusic\n\nFast-paced orchestral-comedic action music with rhythmic percussion and energetic strings, emphasizing the absurd airborne chaos.",
  "duration": 5,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "off"
}
```

#### Output

```json
"https://replicate.delivery/xezq/eSEDSE305CX6JiEgqKf1rwAi3ZRFijVUQ7NRsfez57fKZJw5C/9cf996c2-585a-4817-a673-0063c82b1b9c.mp4"
```


### Example (https://replicate.com/p/k4a7qv19dsrmr0d0n69t0q9p1w)

#### Input

```json
{
  "mode": "speed",
  "image": "https://replicate.delivery/pbxt/PoOCZJqSL0E8tX7VpYdcsyR8k14n2lzR1XyFsjPMAnzvR4gs/tmp50umr2bd.webp",
  "prompt": "How the reference pictures align with the target video \u2014 Picture 1 aligns with the 0.00-second mark of the target video; Picture 2 aligns with the 10.00-second mark of the target video.\n\nintegrated_multimodal_description:\n[Shot 1] Painterly 2D animated comedy in an Arcane-inspired animation style, with expressive hand-drawn character acting, textured brushwork, warm cinematic office lighting, stylized realism, and slightly exaggerated comedic timing.\n\n0.00\u20135.00 seconds \u2014 discovery\n\nBegin in the exact composition established by Picture 1. Nils sits at his workstation, focused on the monitor and completely unaware that Pruna is perched on the top edge of his office chair immediately behind his head.\n\nPruna notices Nils\u2019s thick, tousled brown hair and studies it with curious fascination. It carefully reaches forward with both tiny hands and grabs a small lock of hair.\n\nPruna gives the lock a very gentle experimental tug to the left.\n\nInstantly, and completely involuntarily, Nils\u2019s left hand slides sideways across the keyboard.\n\nPruna immediately lets go.\n\nNils freezes.\n\nHe slowly looks down at his own hand with a confused expression, as though wondering why it moved by itself. Behind him, Pruna stares at the hand with equally wide-eyed surprise.\n\nA brief comedic pause.\n\nNils quietly says:\n\n<d>[English] What?</d>\n\nPruna looks from Nils\u2019s hair to his hand and realizes there may be a connection. Its expression shifts from confusion to fascinated curiosity.\n\nPruna cautiously grabs the same lock again.\n\nThis time it gives a slightly more deliberate tug.\n\nNils\u2019s hand suddenly jerks forward and his finger strikes a key on the keyboard.\n\nAt approximately 5.00 seconds: HARD CUT ON THE KEYBOARD CLICK.\n\nUse the sharp sound of the key press to motivate the edit. No dissolve or camera transition.\n\n5.00\u201310.00 seconds \u2014 realization and payoff\n\nCut immediately to a frontal, lower, much closer camera angle facing Nils across the desk, creating a sudden increase in comedic intensity.\n\nPruna has now scrambled up into Nils\u2019s thick hair and is perched directly on top of his head. It grabs one lock of hair in each hand like tiny control levers.\n\nNils leans toward the keyboard, startled and increasingly alarmed.\n\nPruna experimentally pulls one lock.\n\nNils\u2019s corresponding hand immediately presses another key.\n\nPruna\u2019s eyes widen.\n\nNils\u2019s eyes widen too.\n\nPruna quickly tries the other lock.\n\nNils\u2019s other hand responds involuntarily, moving across the keyboard.\n\nBoth realize at essentially the same moment what is happening.\n\nNils recoils forward in shock, hands spread across the keyboard, mouth open, while Pruna clutches the two locks of hair with a startled expression of its own.\n\nThe final two seconds should emphasize the comedic reaction rather than introduce more action. Use a subtle cinematic push-in toward their faces.\n\nBy exactly 10.00 seconds, Pruna\u2019s position on top of Nils\u2019s head, the two locks held in its hands, Nils\u2019s shocked facial expression, his hands over the keyboard, and the frontal composition converge precisely on Picture 2.\n\noverall_soundscape:\nSoft modern-office ambience, distant ventilation and computer fans, subtle keyboard sounds, tiny rustles as Pruna moves through Nils\u2019s hair, individual strands brushing against one another, and Nils\u2019s quiet surprised breath. The keyboard click immediately before the cut should be slightly emphasized and act as the sonic bridge between the two shots.\n\nnon_diegetic_music:\nBegin almost without music. After the first accidental hand movement, introduce a very light playful pizzicato motif. Add a small plucked-string accent when Nils\u2019s hand moves unexpectedly. At the hard cut, punctuate the keyboard click with a brief comedic musical accent, then let the pizzicato become slightly quicker and more mischievous as Pruna discovers how the hair controls Nils. End on a short unresolved playful note as both stare in shock.",
  "duration": 10,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "last_frame_image": "https://replicate.delivery/pbxt/PoOCZqw1x0uSgcFGrcQIHLEOXmX9aNzArr7ArOXQ8NPqtU4T/tmpiwo83hmw.webp",
  "prompt_upsampler": "off"
}
```

#### Output

```json
"https://replicate.delivery/xezq/svn6bziDH4pCOdwp6BF4ZQSScZ3ByhYaaIUg9gH3pp6JVgzF/f9ba7443-0299-42c6-a5f2-eb28efa162ff.mp4"
```


### Example (https://replicate.com/p/t6hqwd4j35rmr0d0n6hv8nw57c)

#### Input

```json
{
  "mode": "speed",
  "image": "https://replicate.delivery/pbxt/PoOTXwliM71qZKV2pydV2wHXazjZYGekU5RjzBOwLJknc1jk/tmpfqmu3epv-3.webp",
  "prompt": "The white truck speeds down the highway while the green inflatable character violently bends, flaps, twists, collapses, and springs back upright in the strong wind. Follow closely from behind in one continuous dynamic tracking shot with fast road motion, passing traffic, rushing wind, and playful energetic sound.",
  "duration": 15,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "turbo"
}
```

#### Output

```json
"https://replicate.delivery/xezq/KkcfyGdeSilW30pMutweCJKM3lJWFkWJMXLBfe0et2dqZZgzF/746ee197-9baa-40f3-8bc7-e252b0aa76aa.mp4"
```


### Example (https://replicate.com/p/p0c50mx1q1rmt0d0n6m9h6x2sr)

#### Input

```json
{
  "mode": "speed",
  "image": "https://replicate.delivery/pbxt/PoOYmpG4TipOn2uMD6sB60Ajzk4Tv7CX3zz7q4CWXPuxU3xP/tmps04zwc81.webp",
  "prompt": "Tiny real SWAT officers raid a glowing LEGO house in a child\u2019s bedroom, advancing tactically, opening the door, sweeping flashlights, and entering in formation. Shoot it from floor level in one tense cinematic shot with strong miniature scale contrast, warm house light, soft blue bedroom ambience, and subtle tactical sound.",
  "duration": 7,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "turbo"
}
```

#### Output

```json
"https://replicate.delivery/xezq/CYdXprFiUf2FEKlrJQnxZXaowbU5hTCesNQ1Tv0y6TUpqBOXA/b82d9233-8a6e-4bed-8bfa-de3d10c2351b.mp4"
```


### Example (https://replicate.com/p/hk81n2h7csrmy0d0n6nbhrs55c)

#### Input

```json
{
  "mode": "speed",
  "image": "https://replicate.delivery/pbxt/PoOaNIJfibMvkevhrcpUoi1BykUk5nbsQWipNRuHYGd4uOL0/tmp5heinwnb.webp",
  "prompt": "Two harnessed dolphins pull a sled across the Arctic snow by leaping through it like water, kicking up powder while the bundled rider bounces and holds the reins. Keep it dynamic and surreal but believable, with sunset light, natural camera shake, rushing snow, and a cold windy ambience.",
  "duration": 7,
  "resolution": "768p",
  "aspect_ratio": "16:9",
  "prompt_upsampler": "turbo"
}
```

#### Output

```json
"https://replicate.delivery/xezq/nS19jfM3KGVrAyUkFWn2tAVhRyaLP28aLZsx9AJLokCG2AnLA/edb08d08-c019-4ad3-8dae-a52f8c72025a.mp4"
```


## Model readme

> # p-video-2-pro
> 
> Generate high-quality AI video from text or images with Pruna's p-video-2-pro.
> 
> p-video-2-pro is Pruna's quality-focused video model. It gives you two generation modes, control over the first and last frame, and a set of resolution and aspect ratio options so you can trade off speed against fidelity.
> 
> ## How it works
> 
> The model takes:
> 
> - A `prompt` describing the subject, action, scene, and optionally camera, lighting, and style.
> - An optional `image` to use as the first frame for image-to-video, and an optional `last_frame_image` to control the ending.
> - A `mode`, `resolution`, `duration`, and `aspect_ratio`.
> 
> It returns a generated video.
> 
> ## Inputs
> 
> - `prompt` (required): what to generate.
> - `mode`: `speed` for faster generation (default) or `quality` for higher fidelity.
> - `resolution`: `480p` or `768p` (default `768p`).
> - `duration`: 5 to 15 seconds (default 5).
> - `aspect_ratio`: 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, or 1:1. Reference images determine the canvas when provided.
> - `image`: first-frame reference image for image-to-video.
> - `last_frame_image`: last-frame reference image for control over the ending.
> - `prompt_upsampler`: expand your prompt before generation. `off`, `turbo` (default), or `max`.
> - `seed`: set for reproducible results.
> 
> ## Tips
> 
> - Start with the subject, action, and scene. Add camera movement, lighting, and style when you need more precise, repeatable results.
> - Use `mode: speed` for fast iteration, then switch to `mode: quality` for final renders.
> - For image-to-video, use a high-quality, well-lit reference image and keep the requested motion consistent with the starting frame.
> - Use `last_frame_image` when you need control over how the video ends.
> 
> ## Pricing
> 
> You pay per second of returned video, based on mode and resolution.
> 
> ## Resources
> 
> Docs: https://docs.pruna.ai/en/stable/docs_pruna_endpoints/index.html

