License clips & get download links
dansugc.ugc.clips.purchasePurchase B-Roll Videos
- 价格
- $11/result按目录价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- 2026年11月4日实测可用
POSThttps://toolswitch.dev/v1/tools/dansugc.ugc.clips.purchaseBeta- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
Two-step confirm: call once without expected_total_cents to get the exact total (409, nothing charged), then again with it to buy. Clips the account already owns come back under already_purchased and are not charged again. download_url links are signed for 1 hour; dansugc.ugc.purchases.list re-issues them. Each clip comes with a 12-month commercial license.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 请求体(JSON) | ||||
video_ids | 数组 | 必填 | 1–50 clip UUIDs | ["1166a85d-b967-4fb0-8ed8-6d2f2d22f23b"] |
customer_email | 字符串 | 可选 | your end customer, for your own billing reconciliation | |
expected_total_cents | 整数 | 可选 | the confirmed total in hundredths of a credit. A call without it (or with a stale value) charges nothing and answers 409 with requiresConfirmation and expectedTotalCents (e.g. 1100 for one video); repeat the call with that value to buy | 1100 |
- 请求体(JSON)
video_ids数组必填1–50 clip UUIDs
示例:
["1166a85d-b967-4fb0-8ed8-6d2f2d22f23b"]customer_email字符串可选your end customer, for your own billing reconciliation
expected_total_cents整数可选the confirmed total in hundredths of a credit. A call without it (or with a stale value) charges nothing and answers 409 with requiresConfirmation and expectedTotalCents (e.g. 1100 for one video); repeat the call with that value to buy
示例:
1100
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X POST 'https://toolswitch.dev/v1/tools/dansugc.ugc.clips.purchase' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '{"video_ids":["1166a85d-b967-4fb0-8ed8-6d2f2d22f23b"],"expected_total_cents":0}'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/dansugc.ugc.clips.purchase",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("{\"video_ids\":[\"1166a85d-b967-4fb0-8ed8-6d2f2d22f23b\"],\"expected_total_cents\":0}"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/dansugc.ugc.clips.purchase", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("{\"video_ids\":[\"1166a85d-b967-4fb0-8ed8-6d2f2d22f23b\"],\"expected_total_cents\":0}")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为 Beta,地址与鉴权方式可能变更。 示例参数仅为样例数据。 调用按 $11/result 计费,已含服务费。