Skip to main content
API Reference for pruna/p-video-2, served by Comfy Router from Pruna.

Quick start

Create a key in your Comfy workspace and export it as COMFY_API_KEY. The Python and TypeScript snippets use the Comfy SDKs (pip install comfy-sdk, npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP. Model ID: pruna/p-video-2 Endpoint: POST https://api.comfy.org/v2/models/pruna/p-video-2

Schema

Input

object
required
P-Video-2 generation parameters. The generation is billed per second of the finished video, measured from the returned file, at a rate set by resolution and draft. The safety filter is always on; a disable_safety_filter value in the request is ignored.
string
default:"\"16:9\""
Aspect ratio: 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 or 1:1. Ignored when image is set.
string
Input audio URI to condition the generation (flac, mp3 or wav). The output length follows the audio.
boolean
default:"false"
Faster, lower-quality preview, billed at the draft rate.
integer
Duration of the generated video in seconds (1-20). When omitted the model chooses the length from the prompt, up to 20 seconds. Ignored when audio is set.Range: 1 to 20
integer
default:"24"
Frame rate: 24 or 48.
string
Input image URI for image-to-video (jpg, jpeg, png or webp).
string
Reference image URI for the last frame.
string
required
Text prompt for video generation.
boolean
default:"true"
Rewrite the prompt before generation. Disable it when a seed must reproduce a result.
string
default:"\"720p\""
Output resolution: 720p or 1080p.
boolean
default:"true"
Save the video with audio.
integer
Random seed for reproducible generation. Random when omitted.
Generated from the schema Router serves at GET /v2/models/pruna/p-video-2/openapi.json, the same document it validates a call against before the request reaches the provider.

Output

string
Error message. Present when status is failed.
string
URL of the finished video. Present when status is succeeded.
string
Human-readable progress message.
string
Prediction status: starting, processing, succeeded, failed or canceled.

Examples

Input

Output

Before you ship

The SDKs create an Idempotency-Key and reuse it for automatic retries. For manual retries, reuse the original key. Router can hold the connection for up to 10 minutes. When a request fails, Router sends an X-Comfy-Error-Type response header explaining why. A 422 means Router rejected the input before calling the provider. Download generated assets promptly because result URLs can expire.

Headers

Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.

Using the Router API

Model discovery, validation errors, retries, and billing.

Limitations

What Router does not do today, and what to use instead.