p-video-edit
Edit an existing video from a text prompt, optionally guided by reference images
Edit an existing video from a text prompt, optionally guided by reference images
p-video-edit takes a source video and a text prompt, then returns an edited video. Optional reference images guide identity or style. Input video maximum length is 15 seconds.
Rate Limit: 50 requests per minute
Category: Video Editing
Pricing: billed per second of the returned video ($0.045 standard, $0.025 draft).
| Configuration | Price |
|---|---|
standard (draft=false) | 0.045$ per second of output video |
draft (draft=true) | 0.025$ per second of output video |
curl -X POST "https://api.pruna.ai/v1/files" \
-H "apikey: YOUR_API_KEY" \
-F "content=@/path/to/source-video.mp4"
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-video-edit' \
-d '{
"input": {
"video": "https://api.pruna.ai/v1/files/source-video-abc123",
"prompt": "Replace the sky with a sunset"
}
}'
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-video-edit' \
-H 'Try-Sync: true' \
-d '{
"input": {
"video": "https://api.pruna.ai/v1/files/source-video-abc123",
"prompt": "Replace the sky with a sunset",
"draft": true
}
}'
curl -X POST "https://api.pruna.ai/v1/files" \
-H "apikey: YOUR_API_KEY" \
-F "content=@/path/to/reference-image.png"
curl -X POST 'https://api.pruna.ai/v1/predictions' \
-H 'Content-Type: application/json' \
-H 'apikey: YOUR_API_KEY' \
-H 'Model: p-video-edit' \
-d '{
"input": {
"video": "https://api.pruna.ai/v1/files/source-video-abc123",
"prompt": "Replace the person with the reference",
"images": [
"https://api.pruna.ai/v1/files/reference-image-def456"
]
}
}'
| Parameter | Type | Description |
|---|---|---|
| video | string (URI) | Input video to edit. Maximum length: 15 seconds |
| prompt | string | Text prompt describing the edit |
| Parameter | Type | Default | Description |
|---|---|---|---|
| images | arraystring URI | Optional reference image(s) for reference-guided editing. Up to 4 images. Supports jpg, jpeg, png, webp | |
| prompt_upsampling | boolean | true | Use prompt upsampling to enhance the edit prompt |
| draft | boolean | false | Draft mode. Faster, lower-quality preview. Billed at $0.025 per second |
| save_audio | boolean | true | Save the video with audio |
| seed | integer | random | Random seed. Set for reproducible generation |