License clips & get download links
dansugc.ugc.clips.purchasePurchase B-Roll Videos
- Precio
- $11/resultA precio de catálogo
- Tasa de éxito
- —Aún no hay datos de tasa de éxitoAún no hay datos de tasa de éxito
- Latencia p50
- ——
- Última verificación
- 4 nov 2026Verificado y operativo
POSThttps://toolswitch.dev/v1/tools/dansugc.ugc.clips.purchaseBeta- Usa la cuota de la plataforma
- Respuesta síncrona
- Lee datos públicos
Parámetros
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.
| Parámetro | Tipo | Obligatorio | Descripción | Ejemplo |
|---|---|---|---|---|
| Cuerpo (JSON) | ||||
video_ids | matriz | Obligatorio | 1–50 clip UUIDs | ["1166a85d-b967-4fb0-8ed8-6d2f2d22f23b"] |
customer_email | cadena | Opcional | your end customer, for your own billing reconciliation | |
expected_total_cents | entero | Opcional | 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 |
- Cuerpo (JSON)
video_idsmatrizObligatorio1–50 clip UUIDs
Ejemplo:
["1166a85d-b967-4fb0-8ed8-6d2f2d22f23b"]customer_emailcadenaOpcionalyour end customer, for your own billing reconciliation
expected_total_centsenteroOpcionalthe 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
Ejemplo:
1100
Ejemplos de código
Sustituye $TOOLSWITCH_KEY por la clave que creaste en la consola.
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());La API de la pasarela está en Beta; su URL y autenticación pueden cambiar. Los parámetros del ejemplo son datos de muestra. Las llamadas se facturan a $11/result, incluida la tarifa de servicio.