{ "model_id": "pruna/p-video-replace", "provider_id": "pruna", "name": "P-Video-Replace", "description": "Pruna's P-Video-Replace takes a source video and one or more identity reference images, then places the referenced person or people into the video while preserving the source motion and audio.", "task": "Image-to-Video", "tags": [ "Video Generation", "Character Replacement", "Identity" ], "context_length": null, "max_output_tokens": null, "schema_version": "1.0.0", "pricing": { "Default (per second)": 0.03, "@720p (per second)": 0.03, "@1080p (per second)": 0.06 }, "examples": [ { "name": "Character Swap", "description": "Replace the person in a source video with an identity reference image, preserving motion and audio.", "input": { "video": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4", "images": [ "https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg" ], "resolution": "720p", "target_fps": "original" }, "output": { "video": "https://examples.aig.cloudflare.com/pruna/p-video-replace/character-swap.mp4" }, "raw_response": { "state": "Completed", "result": { "video": "https://examples.aig.cloudflare.com/pruna/p-video-replace/character-swap.mp4" }, "gatewayMetadata": { "keySource": "Unified" } }, "code_snippets": [ { "label": "typescript", "language": "typescript", "code": "const response = await env.AI.run(\n 'pruna/p-video-replace',\n {\n video: 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4',\n images: ['https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg'],\n resolution: '720p',\n target_fps: 'original',\n },\n)\nconsole.log(response)" }, { "label": "curl", "language": "bash", "code": "curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \\\n --header \"Authorization: Bearer $CLOUDFLARE_API_TOKEN\" \\\n --header \"Content-Type: application/json\" \\\n --data '{\n \"model\": \"pruna/p-video-replace\",\n \"input\": {\n \"video\": \"https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4\",\n \"images\": [\n \"https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg\"\n ],\n \"resolution\": \"720p\",\n \"target_fps\": \"original\"\n }\n}'" } ] } ], "default_example": null, "code_snippets": [], "supports_async": false, "zdr": false, "zdr_comment": null, "external_info": "https://docs.api.pruna.ai/guides/quickstart", "terms": null, "cover_image_url": null, "metadata": { "Resolutions": "720p, 1080p", "Reference Images": "1-3" }, "request_formats": null, "providers": null, "provider_details": [ { "id": "pruna", "pricing": { "default": 0.03, "720p": 0.03, "1080p": 0.06 } } ], "banner": null, "created_at": "2026-06-18 15:53:11", "schema": { "input": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "video": { "type": "string", "description": "Source RGB video (.mp4) used as the motion and audio source. HTTP(S) URL or data URI." }, "images": { "minItems": 1, "maxItems": 3, "type": "array", "items": { "type": "string" }, "description": "Identity reference image(s), 1 to 3, to place into the video. Each entry is an HTTP(S) URL or a data URI." }, "turbo": { "default": false, "description": "Turbo mode: faster generation for slightly lower quality.", "type": "boolean" }, "resolution": { "default": "720p", "description": "Target resolution.", "type": "string", "enum": [ "720p", "1080p" ] }, "save_audio": { "default": true, "description": "Save the video with audio.", "type": "boolean" }, "ignore_audio": { "default": false, "description": "Ignore source audio during generation.", "type": "boolean" }, "target_fps": { "default": "original", "description": "Target FPS for the working video.", "type": "string", "enum": [ "24", "48", "original" ] }, "instruction_prompt": { "default": "", "description": "Further instruction on how to place people from the reference images into the scene.", "type": "string" }, "seed": { "description": "Random seed for reproducible generation.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "disable_safety_checker": { "default": false, "description": "Disable safety checker for generated videos.", "type": "boolean" } }, "required": [ "video", "images", "turbo", "resolution", "save_audio", "ignore_audio", "target_fps", "instruction_prompt", "disable_safety_checker" ], "additionalProperties": {} }, "output": { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "video": { "type": "string", "format": "uri", "description": "Presigned URL for the replacement video." } }, "required": [ "video" ], "additionalProperties": {} } } }