P-Video
Text-to-Video • Pruna AIPruna's P-Video is a premium video generation model supporting text-to-video, image-to-video, and audio-conditioned generation up to 1080p at 24 or 48 fps, with configurable duration up to 20 seconds.
| Model Info | |
|---|---|
| More information | link ↗ |
| Pricing | View pricing in the Cloudflare dashboard ↗ |
Usage
const response = await env.AI.run( 'pruna/p-video', { prompt: 'A sports car drifting through a neon-lit city at night, cinematic aerial shot', duration: 5, resolution: '720p', aspect_ratio: '16:9', draft: true, },)console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \ --header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \ --header "Content-Type: application/json" \ --data '{ "model": "pruna/p-video", "input": { "prompt": "A sports car drifting through a neon-lit city at night, cinematic aerial shot", "duration": 5, "resolution": "720p", "aspect_ratio": "16:9", "draft": true }}'{ "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/pruna/p-video/neon-city-drift.mp4" }, "gatewayMetadata": { "keySource": "Unified" }}Parameters
stringrequireddefault: 16:9enum: 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1Aspect ratio of the video. Ignored when an input image is provided.stringInput audio to condition video generation. HTTP(S) URL or data URI. Supports flac, mp3, wav. When provided, duration is ignored.booleanrequireddefault: trueDisable safety filter for prompts and input images.booleanrequireddefault: falseDraft mode. Generates a lower-quality preview of the video.integerrequireddefault: 5maximum: 20minimum: 1Duration of the video in seconds (1-20). Ignored when audio is provided.one ofrequiredstringInput image to generate video from (image-to-video). HTTP(S) URL or data URI. Supports jpg, jpeg, png, webp. When provided, aspect_ratio is ignored.stringReference image for the last frame of the video. HTTP(S) URL or data URI.stringrequiredText prompt for video generation.booleanrequireddefault: trueUse prompt upsampling to enhance the prompt.stringrequireddefault: 720penum: 720p, 1080pVideo resolution.booleanrequireddefault: trueSave the video with audio.integermaximum: 9007199254740991minimum: -9007199254740991Random seed for reproducible generation.stringformat: uriPresigned URL for the generated video.