Skip to main content
API Reference for pruna/p-video-2-pro-reference, served by Comfy Router from Pruna. Input: Text, Image, Video, Audio · Output: Video + Audio

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 and npm install @comfyorg/sdk); the cURL snippet is the same call over raw HTTP. Model ID: pruna/p-video-2-pro-reference Endpoint: POST https://api.comfy.org/v2/models/pruna/p-video-2-pro-reference
The same body, sent to POST https://api.comfy.org/v2/models/pruna/p-video-2-pro-reference/requests. Router answers 201 with a request_id as soon as the run is admitted, and the result is collected once it is ready, from this process or another one. Queued delivery walks through status, cancellation and collection.

Schema

Input

object
required
P-Video-2-Pro Reference parameters. The job is billed per second of the returned video, measured from the returned file and rounded down to a whole second, at the rate for resolution and mode. Each reference is billed too: every image (first_frame_image and last_frame_image included) once, and every video and audio clip per second of its real length, at most duration + 0.5 seconds per clip. Video and audio references must be publicly readable http(s) URLs, because their lengths are read before the job is sent. The safety filter is always on; an enable_safety_filter value in the request is ignored.
string
default:"\"16:9\""
adaptive, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3 or 1:1.
string[]
Reference audio URIs. At most 3, 15 seconds combined.
integer
default:"5"
Output length in seconds.Range: 5 to 15
string
Opening frame image URI. Billed as a reference image.
string[]
Reference image URIs. At most 9, first and last frames included.
boolean
default:"false"
Use the one audio reference as the video’s soundtrack. Needs exactly one audio reference, which is still billed.
string
Closing frame image URI. Billed as a reference image.
string
default:"\"speed\""
speed or cost. The mode sets the rates.
string
required
Text prompt. At least one image or video reference is also required.
string
default:"\"turbo\""
turbo, max or off.
string
default:"\"768p\""
Output resolution: 480p, 768p, 1080p, 2k or 4k. 1080p, 2k and 4k upscale the 768p video.
integer
Seed for reproducible generation.
string[]
Reference video URIs. At most 3, 2 to 15 seconds each, 15 seconds combined.
Generated from the schema Router serves at GET /v2/models/pruna/p-video-2-pro-reference/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.
object
Pruna’s safety-checker verdict. Present on a failed status when content moderation blocked the prediction.
boolean
Whether the safety checker blocked the prediction.
boolean
Whether the block comes from a safety filter the request could disable.
string[]
Content-policy categories that triggered the block, for example sexual.
string
Human-readable summary of the block.
string
What was screened: input (the submitted request) or output (the generated video).
string
Human-readable reason for the block.
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, and a 413 means the request body was larger than Router accepts. Download generated assets promptly because result URLs can expire. Any size limit named in a field description above is the provider’s own bound on that field, quoted from the provider’s specification. Router applies a separate cap to the whole request body, which base64-encoded media counts against: see request body size. This page documents one partner model called through Comfy Router. The same comfy-sdk / @comfyorg/sdk package also ships a second client, for running a whole ComfyUI workflow graph on Comfy Cloud: Comfy(api_key=...) / new Comfy({ apiKey }), with client.workflows, client.assets and client.jobs. See Comfy SDKs.

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.