Pruna AI P Video 2 Image To Video API Documentation
Playground
Try it on WaveSpeedAI!Pruna P-Video-2 Image-to-Video generates videos from input images with explicit controls for duration, resolution, draft mode, and audio output, making it suitable for image animation, creative videos, social content, ads, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Pruna P-Video-2 Image-to-Video generates videos from an input image and a motion prompt. Upload a reference image, describe the motion or scene direction, choose a duration from 1 to 20 seconds, and generate either a full-quality video or a lower-cost draft preview.
Why Choose This?
-
Image-to-video generation
Turn a still image into a video using a motion prompt. -
Image-based aspect ratio
The output aspect ratio follows the input image automatically. -
Flexible duration control
Choose an explicit duration from1to20seconds. -
Draft and Full modes
Use Draft mode for faster, lower-cost previews, or Full mode for higher-quality output. -
720p and 1080p output
Generate at720pfor lower cost or1080pfor higher-resolution results. -
Prompt upsampling
Useprompt_upsamplingto expand and refine the generation prompt.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Non-empty generation prompt describing the desired motion, scene, camera movement, and visual direction. |
| image | Yes | Input image used as the visual source. Upload JPEG, PNG, or WebP, or provide a public image URL. The output aspect ratio follows this image. |
| duration | Yes | Requested video duration in seconds. Range: 1–20. No default is supplied. |
| resolution | No | Output resolution: 720p or 1080p. Default: 720p. |
| draft | No | Enable lower-quality Draft mode for faster, lower-cost previews. Default: false. |
| save_audio | No | Save audio in the generated result when supported. Default: true. |
| prompt_upsampling | No | Expand and optimize the generation prompt. Default: true. |
| seed | No | Optional non-negative integer seed for reproducible results. Omit for random generation. |
How to Use
- Upload an input image — Provide the image that should guide the video appearance and aspect ratio.
- Write a motion prompt — Describe the action, movement, camera direction, mood, and scene changes.
- Set duration — Choose an explicit duration from
1to20seconds. - Choose resolution — Use
720pfor lower-cost generation or1080pfor higher-resolution output. - Choose Draft or Full mode — Enable
draftfor preview generation or leave it disabled for full output. - Configure prompt upsampling optional — Keep
prompt_upsamplingenabled when you want the prompt refined automatically. - Set seed optional — Use a fixed seed for reproducible results, or omit it for random generation.
- Submit — Generate the final image-to-video output.
Pricing
Pricing is based on the explicitly requested duration, selected resolution, and draft mode.
| Resolution | Full / second | Draft / second |
|---|---|---|
| 720p | $0.025 | $0.015 |
| 1080p | $0.05 | $0.03 |
Example Costs
| Duration | 720p Full | 720p Draft | 1080p Full | 1080p Draft |
|---|---|---|---|---|
| 5s | $0.125 | $0.075 | $0.25 | $0.15 |
| 10s | $0.25 | $0.15 | $0.50 | $0.30 |
| 20s | $0.50 | $0.30 | $1.00 | $0.60 |
Billing uses the requested duration, not the measured duration of the generated output. save_audio, prompt_upsampling, and seed do not add separate charges.
Best Use Cases
- Image animation — Turn a still image into a short motion clip.
- Prompt-based motion testing — Test different action, camera, and scene directions from the same image.
- Draft previews — Use Draft mode to compare motion ideas before running full-quality output.
- Social video content — Generate short clips from portraits, products, illustrations, or concept images.
- Creative prototyping — Explore visual motion from a static source image.
- Marketing and product visuals — Animate product or campaign images for short-form video use.
Pro Tips
- Use a clear, high-quality image for stronger subject and composition consistency.
- Write prompts that describe visible motion, not just visual style.
- Include camera direction, subject action, lighting, and mood when the shot needs stronger control.
- Use Draft mode for quick iteration before generating the final version.
- Use
720pfor lower-cost tests and1080pfor higher-resolution output. - Set a fixed
seedwhen comparing prompt or parameter changes. - This product does not support automatic duration, audio conditioning, or last-frame guidance.
- Frame rate follows the upstream default.
Related Models
- Pruna P-Video-2 Text-to-Video — Generate videos directly from text prompts.
- Pruna P-Video-2 Image-to-Video — Generate videos from an input image and motion prompt.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"duration": 5,
"resolution": "720p",
"draft": false,
"save_audio": true,
"prompt_upsampling": true
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/pruna-ai/p-video-2/image-to-video" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | The positive prompt for generation. | |
| image | string | Yes | - | Upload an input image or provide its public URL (JPEG, PNG, or WebP). The image determines the output aspect ratio. | |
| duration | integer | Yes | 5 | 1 ~ 20 | Requested video duration in seconds. Defaults to 5 seconds; automatic duration is not available. |
| resolution | string | No | 720p | 720p, 1080p | Output video resolution. |
| draft | boolean | No | false | - | Generate a faster, lower-quality preview at half the full-mode per-second rate. |
| save_audio | boolean | No | true | - | Save the video with audio. |
| prompt_upsampling | boolean | No | true | - | Enhance the prompt before video generation. |
| seed | integer | No | - | 0 ~ 2147483647 | Random seed for reproducibility. Omit for a random seed. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |