關於 Video Sound Effects
依你的影片配上音效和環境音。
在 POST /jobs/createTask 把模型名稱填成 popnow/foley-v1/video-to-audio 就能呼叫,1 點數/ 5 秒影片起(US$0.01)。新帳戶送 30 點數,可以先在 Playground 免費試用。
請求參數
| 參數 | 必填 | 說明 |
|---|---|---|
duration_seconds | 否 | 影片長度,按秒計費。 ≥ 1 · ≤ 30 · 預設值: 8 |
guidance_scale | 否 | 模型遵循提示詞的嚴格程度。 ≥ 0 · ≤ 20 · 預設值: 4.5 |
ignore_visual_semantics | 否 | Choose the sounds from the prompt alone instead of from what the picture shows; timing still follows the motion. 預設值: false |
negative_prompt | 否 | 不想在曲子裡出現的風格或聲音。 |
prompt | 否 | The sounds you want, as a short list. If omitted, a general request for sounds that match the on-screen action is used. |
steps | 否 | 步數越多細節越多,但更慢。 ≥ 4 · ≤ 50 · 預設值: 25 |
video_url | 是 | 要處理的影片。 |
價格
價格以點數計,和網站上用的是同一種點數(1 點 = $0.01)。任務受理時先凍結點數,完成後依實際費用結算;失敗的任務會退還。
| 選項 | 點數 /秒 | ≈ 美元 |
|---|---|---|
| 標準 | 0.18 | US$0.0018 |
每個任務會無條件進位到整數點數,所以最低檔跑一次是 1 點數/ 5 秒影片(US$0.01)。
想在執行前知道確切金額,把相同的請求內容送到 POST /jobs/quote 即可。
API 快速上手
三步驟呼叫 Video Sound Effects API
- 建立 API 金鑰. 登入 PopNow,在 API 主控台建立金鑰。金鑰以 sk-popnow- 開頭,和網站共用同一份點數。
- 送出請求. 對 POST /jobs/createTask 送出請求,model 填 popnow/foley-v1/video-to-audio,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": "popnow/foley-v1/video-to-audio",
"input": {
"video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
"duration_seconds": 8
}
}'
# 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 頁籤裡有回應、輪詢和回呼的參考。
Video Sound Effects API 常見問題
Video Sound Effects API 怎麼收費?
Video Sound Effects:1 點數(US$0.01)/ 5 秒影片。點數和網站通用(1 點數 = $0.01),新帳號贈送 30 點數,失敗的任務會退還。
Video Sound Effects 在 API 裡的模型名稱是什麼?
在 POST /jobs/createTask 的 model 欄位填 影片配音效用 popnow/foley-v1/video-to-audio。
Video Sound Effects API 有哪些限制?
影片長度:1–30 s;提示詞長度(字元):1,000;單一上傳上限:90 MB。超出這些限制的請求會在扣款之前被拒絕。
不寫程式能試 Video Sound Effects 嗎?
可以。Playground 用你的 PopNow 點數執行 Video Sound Effects,不需要 API 金鑰,每次執行都會附上對應的程式碼。