关于 P-Video 2 Pro
5 到 15 秒的带声视频,支持文字、首尾帧或参考片段生成。
在 POST /jobs/createTask 里把模型名写成 pruna-ai/p-video-2-pro/reference-to-video 即可调用,US$0.09 起。
请求参数
| 参数 | 必填 | 说明 |
|---|---|---|
aspect_ratio | 否 | 画面形状:横版、方形或竖版。 auto · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 1:1 · 默认值: auto |
duration_seconds | 否 | 视频时长,按秒计费。 ≥ 5 · ≤ 15 · 默认值: 5 |
generation_mode | 否 | cost is cheaper and slower, speed (the default) is faster at the same quality. cost · speed · 默认值: speed |
image_url | 否 | 作为起点的那张图。 |
keep_reference_audio | 否 | Use the reference audio as the soundtrack instead of generating new sound. Needs exactly one audio clip. 默认值: false |
last_image_url | 否 | 可选的结尾画面,让视频正好停在你想要的地方。 |
prompt | 是 | Say what the shot should take from each reference. Refer to reference videos as video 1, video 2 and to audio clips as audio 1, audio 2, numbered in upload order. |
prompt_optimization_mode | 否 | 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. off · turbo · max · 默认值: off |
reference_audio_urls | 否 | 要匹配的声音:人声、音乐或节奏。 |
reference_video_urls | 否 | 希望结果跟随其动作、运镜或风格的参考视频。 |
resolution | 否 | 输出尺寸。越大越清晰,价格也越高。 480p · 768p · 默认值: 768p |
seed | 否 | 用同一个数字,结果就能复现。 ≥ 0 · ≤ 2147483647 |
价格
价格以美元计。API 使用独立的美元余额。网站积分不能用于 API,也不能转入 API 余额;API 余额同样不能转为网站积分。 任务受理时,从 API 余额中冻结报价的最高金额;完成后按实际用量结算,实扣不超过冻结额,并释放剩余金额。任务失败则释放冻结额。
| 选项 | USD /秒 |
|---|---|
| generation_mode cost · resolution 480p | US$0.018 |
| generation_mode speed · resolution 480p | US$0.024 |
| generation_mode cost · resolution 768p | US$0.03 |
| generation_mode speed · resolution 768p | US$0.042 |
运行前,将相同请求体发送到 POST /jobs/quote,可查看预计费用和最高费用,单位为美元。报价不会运行任务或扣款。
API 快速上手
三步调用 P-Video 2 Pro API
- 创建 API 密钥. 登录 PopNow,在 API 控制台创建密钥。密钥以 sk-popnow- 开头,API 调用使用独立的美元余额。
- 发送请求. 向 POST /jobs/createTask 发请求,model 填 pruna-ai/p-video-2-pro/reference-to-video,input 按参数表填写。响应会立刻返回任务 ID。
- 取回结果. 用任务 ID 轮询 GET /jobs/recordInfo,或者传 callBackUrl,结果会推送到这个地址。任务成功后下载输出链接。
# 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/reference-to-video",
"input": {
"prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
"aspect_ratio": "auto",
"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"请把提示词和链接换成你自己的。API 页签里有响应、轮询和回调的参考。
P-Video 2 Pro API 常见问题
P-Video 2 Pro API 怎么收费?
P-Video 2 Pro:最便宜的任务是参考生视频,US$0.09/ 5 秒视频起。各选项价格:cost · 480p US$0.018/秒、speed · 480p US$0.024/秒、cost · 768p US$0.03/秒、speed · 768p US$0.042/秒。API 使用独立的美元余额。网站积分不能用于 API,也不能转入 API 余额;API 余额同样不能转为网站积分。 任务受理时,从 API 余额中冻结报价的最高金额;完成后按实际用量结算,实扣不超过冻结额,并释放剩余金额。任务失败则释放冻结额。
P-Video 2 Pro · 参考生视频 API 有哪些限制?
视频时长:5–15 s;分辨率:480p · 768p;画面比例:auto · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 +2;参考音频:3;参考视频:3。超出这些限制的请求会在扣费之前被拒绝。
