PopNowAPI
取得 API 金鑰

Video Eraser API

PopNow 出品

在整段影片中清除固定區域

popnow/video-eraser-v1/video-edit
  • 清除字幕區域

關於 Video Eraser

在整段影片中清除固定區域。

在 POST /jobs/createTask 把模型名稱填成 popnow/video-eraser-v1/video-edit 就能呼叫,US$0.024 起。

這份指南目前只有英文版。 →

請求參數

參數必填說明
mask_url是塗出需要改動的區域。
prompt否Optional short description of the objects or area to remove and the surrounding context.
video_url是要處理的影片。

價格

價格以美元計。API 使用獨立的美元餘額。網站點數不能用於 API,也不能轉入 API 餘額;API 餘額同樣不能轉為網站點數。 任務受理時,從 API 餘額中保留報價的最高金額;完成後按實際用量結算,實際扣款不超過保留金額,並釋放剩餘金額。任務失敗則釋放保留金額。

選項USD 每秒輸入長度
標準US$0.024

輸入長度無條件進位至整秒,最低以 3 秒計算。

執行前,將相同請求內容傳送至 POST /jobs/quote,即可查看預估費用與最高費用,單位為美元。報價不會執行任務或扣款。

API 快速上手

三步驟呼叫 Video Eraser API

  1. 建立 API 金鑰. 登入 PopNow,在 API 主控台建立金鑰。金鑰以 sk-popnow- 開頭,API 呼叫使用獨立的美元餘額。
  2. 送出請求. 對 POST /jobs/createTask 送出請求,model 填 popnow/video-eraser-v1/video-edit,input 依照參數表填寫。回應會立即傳回任務 ID。
  3. 取得結果. 用任務 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/video-eraser-v1/video-edit",
  "input": {
    "prompt": "Remove the subtitles inside the white mask. Preserve the rest of the video.",
    "video_url": "https://media.popnow.ai/api-examples/video-eraser/subtitles-e1128ca9.mp4",
    "mask_url": "https://media.popnow.ai/api-examples/video-eraser/subtitles-mask-b701fc56.png"
  }
}'

# 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 Eraser API 常見問題

Video Eraser API 怎麼收費?

Video Eraser:US$0.024/秒。API 使用獨立的美元餘額。網站點數不能用於 API,也不能轉入 API 餘額;API 餘額同樣不能轉為網站點數。 任務受理時,從 API 餘額中保留報價的最高金額;完成後按實際用量結算,實際扣款不超過保留金額,並釋放剩餘金額。任務失敗則釋放保留金額。

Video Eraser 在 API 裡的模型名稱是什麼?

在 POST /jobs/createTask 的 model 欄位填 清除字幕區域用 popnow/video-eraser-v1/video-edit。

Video Eraser API 有哪些限制?

輸入片段最長:600 s。超出這些限制的請求會在扣款之前被拒絕。

不寫程式能試 Video Eraser 嗎?

不需要 API 金鑰,即可在 Playground 用 API 美元餘額執行 Video Eraser。每次執行都記入開發者紀錄,並附對應程式碼。

更多 Video Eraser 相關內容