P-Video 2 Pro API

by Pruna AI

5 to 15 second clips with sound from text, frames or reference clips

pruna-ai/p-video-2-pro/text-to-video
  • Up to 768p
  • 5–15s clips
  • Start and end frames
  • Up to 9 reference images
  • 7 aspect ratios
  • Create Video
  • Image to Video
  • Reference to Video
  • AI Avatar

About P-Video 2 Pro

5 to 15 second clips with sound from text, frames or reference clips.

Call it with the model name pruna-ai/p-video-2-pro/text-to-video on POST /jobs/createTask, from $0.05.

Request parameters

ParameterRequiredDescription
seedNoUse the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647
promptYesDescribe what you want to make.
resolutionNoChoose an available output size. 480p · 768p · Default: 768p
aspect_ratioNoThe shape of the frame: wide, square or tall. 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 1:1 · Default: 16:9
generation_modeNoChoose a mode from the available options. It may affect cost, speed and quality. cost · speed · quality · Default: speed
duration_secondsNoLength of the generated clip. ≥ 5 · ≤ 15 · Default: 5
prompt_optimization_modeNoHow your prompt gets rewritten: one quick pass, or a more detailed multi-step rewrite. off · turbo · max · Default: off

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per second
generation_mode cost · resolution 480p$0.01
generation_mode speed · resolution 480p$0.02
generation_mode cost · resolution 768p$0.025
generation_mode speed · resolution 768p$0.035
generation_mode quality · resolution 480p$0.04
generation_mode quality · resolution 768p$0.075

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

API quick start

Call the P-Video 2 Pro API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
  2. Send the request. POST /jobs/createTask with model pruna-ai/p-video-2-pro/text-to-video and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "pruna-ai/p-video-2-pro/text-to-video",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "aspect_ratio": "16:9",
    "resolution": "768p",
    "generation_mode": "speed",
    "duration_seconds": 5
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

P-Video 2 Pro API questions

How much does the P-Video 2 Pro API cost?

P-Video 2 Pro starts at $0.05 for a 5-second clip with Create Video, its lowest-priced task. Prices by option: cost · 480p $0.01 per second, speed · 480p $0.02 per second, cost · 768p $0.025 per second, speed · 768p $0.035 per second. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What is the model name for P-Video 2 Pro in the API?

Put pruna-ai/p-video-2-pro/text-to-video for Create Video; pruna-ai/p-video-2-pro/image-to-video for Image to Video; pruna-ai/p-video-2-pro/reference-to-video for Reference to Video; pruna-ai/p-video-2-pro/talking-avatar for AI Avatar in the model field of POST /jobs/createTask.

What are the limits of the P-Video 2 Pro API?

Clip length: 5–15 s; Resolutions: 480p · 768p; Aspect ratios: 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 1:1. Requests outside these limits are rejected before anything is charged.

More about P-Video 2 Pro