關於 P-Video 2 Pro
5 到 15 秒的帶聲影片,支援文字、首尾影格或參考片段生成。
在 POST /jobs/createTask 把模型名稱填成 pruna-ai/p-video-2-pro/text-to-video 就能呼叫,US$0.06 起。
請求參數
| 參數 | 必填 | 說明 |
|---|---|---|
seed | 否 | 用同一個數字,結果就能重現。 ≥ 0 · ≤ 2147483647 |
prompt | 是 | Describe the scene, the action, the camera and the sound. Put spoken lines in quotes. |
resolution | 否 | 輸出尺寸。越大越清晰,價格也越高。 480p · 768p · 預設值: 768p |
aspect_ratio | 否 | 畫面形狀:橫式、方形或直式。 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 1:1 · 預設值: 16:9 |
generation_mode | 否 | 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. cost · speed · quality · 預設值: speed |
duration_seconds | 否 | 影片長度,按秒計費。 ≥ 5 · ≤ 15 · 預設值: 5 |
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 |
價格
價格以美元計。API 使用獨立的美元餘額。網站點數不能用於 API,也不能轉入 API 餘額;API 餘額同樣不能轉為網站點數。 任務受理時,從 API 餘額中保留報價的最高金額;完成後按實際用量結算,實際扣款不超過保留金額,並釋放剩餘金額。任務失敗則釋放保留金額。
| 選項 | USD /秒 |
|---|---|
| generation_mode cost · resolution 480p | US$0.012 |
| generation_mode speed · resolution 480p | US$0.024 |
| generation_mode cost · resolution 768p | US$0.03 |
| generation_mode speed · resolution 768p | US$0.042 |
| generation_mode quality · resolution 480p | US$0.048 |
| generation_mode quality · resolution 768p | US$0.09 |
執行前,將相同請求內容傳送至 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/text-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/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"請把提示詞和連結換成你自己的。API 頁籤裡有回應、輪詢和回呼的參考。
P-Video 2 Pro API 常見問題
P-Video 2 Pro API 怎麼收費?
P-Video 2 Pro:最便宜的任務是生成影片,US$0.06/ 5 秒影片起。各選項價格:cost · 480p US$0.012/秒、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 裡的模型名稱是什麼?
在 POST /jobs/createTask 的 model 欄位填 生成影片用 pruna-ai/p-video-2-pro/text-to-video;圖生影片用 pruna-ai/p-video-2-pro/image-to-video;參考生影片用 pruna-ai/p-video-2-pro/reference-to-video。
P-Video 2 Pro API 有哪些限制?
影片長度:5–15 s;解析度:480p · 768p;畫面比例:16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 1:1。超出這些限制的請求會在扣款之前被拒絕。
