PopNowAPI
Get API key

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
  • 7 aspect ratios
  • Create Video
  • Image to Video
  • Reference to Video

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

Model namepruna-ai/p-video-2-pro/text-to-video
EndpointPOST https://api.popnow.ai/api/v1/jobs/createTask
# 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"

The input is built from the schema below, so it passes validation as written. Change the prompt and links to your own.

Price

OptionUSD per second
generation_mode costresolution 480p$0.012
generation_mode speedresolution 480p$0.024
generation_mode costresolution 768p$0.03
generation_mode speedresolution 768p$0.042
generation_mode qualityresolution 480p$0.048
generation_mode qualityresolution 768p$0.09

Billed in USD · Every option and its price: GET /models/pruna-ai/p-video-2-pro/text-to-video

Limits

Clip length
5–15 s
Resolutions
480p · 768p
Aspect ratios
16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 1:1

Parameters

These fields come from the same schema we check every request against. Fields that are not listed are rejected.

  • promptstringRequired

    Describe the scene, the action, the camera and the sound. Put spoken lines in quotes.

    Range
    1 – … chars
  • aspect_ratiostringOptional

    The shape of the frame: wide, square or tall.

    Default
    "16:9"
    Allowed values
    "16:9""9:16""4:3""3:4""3:2""2:3""1:1"
  • resolutionstringOptionalChanges the price

    Output size. Bigger sizes look sharper and cost more.

    Default
    "768p"
    Allowed values
    "480p""768p"
  • generation_modestringOptionalChanges the price

    cost is the cheapest and slower, speed (the default) is faster at the same quality, quality renders a higher-quality clip at a higher price.

    Default
    "speed"
    Allowed values
    "cost""speed""quality"
  • duration_secondsintegerOptionalChanges the price

    How long the clip runs. You pay per second.

    Default
    5
    Range
    5 – 15
  • prompt_optimization_modestringOptional

    Let the service rewrite and expand the prompt first: off follows it word for word, turbo is a quick rewrite, max a fuller one. Does not change the price.

    Default
    "off"
    Allowed values
    "off""turbo""max"
  • seedintegerOptional

    Reuse the same number to get a repeatable result.

    Range
    0 – 2147483647
Raw JSON Schema
{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "seed": {
      "type": "integer",
      "maximum": 2147483647,
      "minimum": 0,
      "description": "Random seed for controlled comparisons, not a frame-identical guarantee."
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "description": "Describe the scene, the action, the camera and the sound. Put spoken lines in quotes."
    },
    "resolution": {
      "enum": [
        "480p",
        "768p"
      ],
      "type": "string",
      "default": "768p",
      "description": "Output resolution. 768p costs more per second than 480p."
    },
    "aspect_ratio": {
      "enum": [
        "16:9",
        "9:16",
        "4:3",
        "3:4",
        "3:2",
        "2:3",
        "1:1"
      ],
      "type": "string",
      "default": "16:9",
      "description": "Output aspect ratio."
    },
    "generation_mode": {
      "enum": [
        "cost",
        "speed",
        "quality"
      ],
      "type": "string",
      "default": "speed",
      "description": "cost is the cheapest and slower, speed (the default) is faster at the same quality, quality renders a higher-quality clip at a higher price."
    },
    "duration_seconds": {
      "type": "integer",
      "default": 5,
      "maximum": 15,
      "minimum": 5,
      "description": "Output length in whole seconds, from 5 to 15. Billed per second."
    },
    "prompt_optimization_mode": {
      "enum": [
        "off",
        "turbo",
        "max"
      ],
      "type": "string",
      "default": "off",
      "description": "Let the service rewrite and expand the prompt first: off follows it word for word, turbo is a quick rewrite, max a fuller one. Does not change the price."
    }
  },
  "additionalProperties": false
}

Responses, polling and callbacks

Every model works the same way: create a task, then poll it or wait for a callback.

Price it first

cURL
curl -X POST https://api.popnow.ai/api/v1/jobs/quote \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -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
  }
}'

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.

Accepted

HTTP
HTTP/1.1 202 Accepted

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_01k3m8x9q2z4v7n5p6r8s0t1w3",
    "state": "queued"
  },
  "request_id": "req_example_create"
}

HTTP 202 means accepted: the maximum USD amount is held until settlement. When a task is accepted, we reserve the maximum quoted amount from your API 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.

Check status

cURL
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Poll every few seconds with backoff and stop once state is succeeded, failed, canceled or expired.

Finished task

JSON
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_01k3m8x9q2z4v7n5p6r8s0t1w3",
    "model": "pruna-ai/p-video-2-pro/text-to-video",
    "state": "succeeded",
    "output": {
      "assets": [
        {
          "url": "https://cdn.popnow.ai/tasks/task_01k3m8x9q2z4v7n5p6r8s0t1w3/output.mp4?signature=FROM_RESPONSE",
          "expiresAt": "2026-10-17T12:20:00Z",
          "mime": "video/mp4",
          "width": 1280,
          "height": 720,
          "durationSeconds": 5
        }
      ]
    },
    "settled": true
  },
  "request_id": "req_example_record"
}

Download from url before expiresAt. Need a fresh link later? Ask POST /common/download-url.

Verify a callback

Node.js
import { createHash, createHmac, timingSafeEqual } from "node:crypto";
import express from "express";

const app = express();
// express.raw keeps the exact bytes that were signed; express.json would not match.
app.post("/hooks/popnow", express.raw({ type: "application/json" }), (req, res) => {
  const timestamp = req.header("X-Webhook-Timestamp");
  const signature = req.header("X-Webhook-Signature") ?? "";
  const body = JSON.parse(req.body.toString("utf8"));
  const taskId = body.data?.taskId ?? body.task_id;
  const digest = createHash("sha256").update(req.body).digest("hex");
  const expected = createHmac("sha256", process.env.POPNOW_WEBHOOK_SECRET)
    .update(`${taskId}.${timestamp}.${digest}`)
    .digest("base64");
  const ok = expected.length === signature.length && timingSafeEqual(Buffer.from(expected), Buffer.from(signature));
  // Check the signature first, then reject anything older than five minutes.
  if (!ok || Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return res.status(401).end();
  res.status(200).end(); // answer fast, then fetch the task and store its files
});

With callBackUrl set, we post the finished task to you. Check the signature against the raw body before you trust it.

Send a local file

cURL
curl -X POST https://api.popnow.ai/api/v1/common/upload-url \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contentType": "image/png", "bytes": 482113}'

# PUT the file bytes to data.uploadUrl with every header in data.headers, then commit it:
curl -X POST https://api.popnow.ai/api/v1/files/$FILE_ID/commit \
  -H "Authorization: Bearer $POPNOW_API_KEY"
# The commit returns a popnow://f/... reference. Put it in any image, video or
# audio field of the task input instead of a public https URL.

Public https links work as they are. Local files go through upload-url and commit first.

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.06.

Request parameters

ParameterRequiredDescription
seedNoReuse the same number to get a repeatable result. ≥ 0 · ≤ 2147483647
promptYesDescribe the scene, the action, the camera and the sound. Put spoken lines in quotes.
resolutionNoOutput size. Bigger sizes look sharper and cost more. 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_modeNocost is the cheapest and slower, speed (the default) is faster at the same quality, quality renders a higher-quality clip at a higher price. cost · speed · quality · Default: speed
duration_secondsNoHow long the clip runs. You pay per second. ≥ 5 · ≤ 15 · Default: 5
prompt_optimization_modeNoLet the service rewrite and expand the prompt first: off follows it word for word, turbo is a quick rewrite, max a fuller one. Does not change the price. off · turbo · max · Default: off

Pricing

Prices are in USD. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API 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.012
generation_mode speed · resolution 480p$0.024
generation_mode cost · resolution 768p$0.03
generation_mode speed · resolution 768p$0.042
generation_mode quality · resolution 480p$0.048
generation_mode quality · resolution 768p$0.09

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 use your separate USD 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.06 for a 5-second clip with Create Video, its cheapest task. Prices by option: cost · 480p $0.012 per second, speed · 480p $0.024 per second, cost · 768p $0.03 per second, speed · 768p $0.042 per second. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API 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 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