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 的更多内容