Pruna AI P Video 2 Text To Video API Documentation

Pruna AI P Video 2 Text To Video API Documentation

Playground

Try it on WaveSpeedAI!

Pruna P-Video-2 Text-to-Video generates videos from text prompts with explicit controls for duration, resolution, draft mode, and audio output, making it suitable for 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 Text-to-Video generates videos directly from text prompts. Describe the scene, motion, camera movement, and visual style, then choose duration, resolution, and Draft or Full mode for fast previews or higher-quality output.


Why Choose This?

  • Text-to-video generation
    Generate videos directly from natural-language prompts.

  • Explicit duration control
    Choose a requested duration from 1 to 20 seconds.

  • Draft and Full modes
    Use Draft mode for faster, lower-cost previews, or Full mode for higher-quality output.

  • 720p and 1080p output
    Generate at 720p for lower cost or 1080p for higher-resolution results.

  • Prompt upsampling
    Use prompt_upsampling to expand and refine the generation prompt.

  • Audio output option
    Keep save_audio enabled when audio should be saved in the generated result.


Parameters

ParameterRequiredDescription
promptYesNon-empty generation prompt describing the scene, motion, camera movement, subject action, and visual direction.
aspect_ratioNoOutput aspect ratio. Default: 16:9.
durationYesRequested video duration in seconds. Range: 1–20. No default is supplied.
resolutionNoOutput resolution: 720p or 1080p. Default: 720p.
draftNoEnable lower-quality Draft mode for faster, lower-cost previews. Default: false.
save_audioNoSave audio in the generated result when supported. Default: true.
prompt_upsamplingNoExpand and optimize the generation prompt. Default: true.
seedNoOptional non-negative integer seed for reproducible results. Omit for random generation.

How to Use

  1. Write a prompt — Describe the scene, subject, action, camera movement, lighting, mood, and visual style.
  2. Choose aspect ratio — Use the default 16:9 or select another supported layout.
  3. Set duration — Choose an explicit duration from 1 to 20 seconds.
  4. Choose resolution — Use 720p for lower-cost generation or 1080p for higher-resolution output.
  5. Choose Draft or Full mode — Enable draft for preview generation or leave it disabled for full output.
  6. Configure prompt upsampling optional — Keep prompt_upsampling enabled when you want the prompt refined automatically.
  7. Set seed optional — Use a fixed seed for reproducible results, or omit it for random generation.
  8. Submit — Generate the final text-to-video output.

Pricing

Pricing is based on the explicitly requested duration, selected resolution, and draft mode.

ResolutionFull / secondDraft / second
720p$0.025$0.015
1080p$0.05$0.03

Example Costs

Duration720p Full720p Draft1080p Full1080p 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. aspect_ratio, save_audio, prompt_upsampling, and seed do not add separate charges.


Best Use Cases

  • Text-to-video generation — Create videos directly from written scene descriptions.
  • Prompt-based motion testing — Test different actions, camera movements, and visual styles.
  • Draft previews — Use Draft mode to compare ideas before running full-quality output.
  • Social video content — Generate short clips for ads, posts, reels, and creative previews.
  • Creative prototyping — Explore cinematic concepts, character scenes, or product visuals from text.
  • Marketing and product videos — Generate short-form promotional clips from text prompts.

Pro Tips

  • Write prompts that describe visible motion, not just the image style.
  • Include subject, action, camera movement, lighting, mood, and scene progression.
  • Use Draft mode for quick iteration before generating the final version.
  • Use 720p for lower-cost tests and 1080p for higher-resolution output.
  • Set a fixed seed when comparing prompt or parameter changes.
  • Keep prompts focused on one main scene or action for more stable motion.
  • This product does not support automatic duration, audio conditioning, or last-frame guidance.
  • Frame rate follows the upstream default.

Notes

  • prompt and duration are required.
  • duration must be explicitly set from 1 to 20 seconds.
  • Billing uses the requested duration.
  • Automatic duration, audio conditioning, and last-frame guidance are not available in this product.

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",
  "duration": 5,
  "aspect_ratio": "16:9",
  "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/text-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
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-The positive prompt for generation.
durationintegerYes51 ~ 20Requested video duration in seconds. Defaults to 5 seconds; automatic duration is not available.
aspect_ratiostringNo16:916:9, 9:16, 4:3, 3:4, 3:2, 2:3, 1:1Aspect ratio of the generated video.
resolutionstringNo720p720p, 1080pOutput video resolution.
draftbooleanNofalse-Generate a faster, lower-quality preview at half the full-mode per-second rate.
save_audiobooleanNotrue-Save the video with audio.
prompt_upsamplingbooleanNotrue-Enhance the prompt before video generation.
seedintegerNo-0 ~ 2147483647Random seed for reproducibility. Omit for a random seed.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<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.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.