Advanced
Webhooks
Get notified the moment a render finishes — no polling. Vivideo POSTs a signed event to your endpoint on completion or failure.
Register an endpoint
POST
/v1/webhooksRegister a URL to receive events. The response includes your signing secret — shown once. Up to 5 active endpoints per account.
Parameters
urlstringrequiredA public https URL. Private/internal addresses are rejected.
eventsstring[]optionalWhich events to send:
video.completed, video.failed. Defaults to both.Returns
The endpoint, including a signing secret (whsec_…). Store it now — it is never shown again.
Example
curl https://api.vivideo.ai/v1/webhooks \
-H "Authorization: Bearer $VIVIDEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://your-server.com/hook","events":["video.completed","video.failed"]}'
# → returns { "id": "whk_...", "secret": "whsec_..." } (secret shown once)GET
/v1/webhooksList your endpoints (secrets are never returned).
DELETE
/v1/webhooks/{id}Delete an endpoint.
Event payload
Events: video.completed and video.failed. Your endpoint receives:
{
"id": "evt_a1b2c3d4e5f60718", // dedupe on this — retries reuse the same id
"object": "event",
"type": "video.completed",
"created": 1784800000,
"data": {
"video": { "id": "...", "status": "completed", "video_url": "https://...mp4" }
}
}Verify the signature
Every delivery carries a signature header:
Vivideo-Signature: t=<unix>,v1=hex(hmac_sha256(secret, "<t>.<raw body>"))Recompute the HMAC over "{t}.{raw body}" with your secret and compare in constant time. Reject timestamps older than ~5 minutes to prevent replay:
# Vivideo signs every delivery:
# Vivideo-Signature: t=<unix>,v1=hex(hmac_sha256(secret, "<t>.<raw body>"))
# Verify it server-side before trusting the event (see JS / Python tabs).Delivery & retries
| Behavior | Detail |
|---|---|
| Success | Your endpoint returns 2xx — delivered. |
| Retries | Non-2xx or timeout retries with backoff: 1m, 5m, 30m, 2h, 6h. |
| Deduplication | Retries reuse the same event.id — dedupe on it. |
| Latency | Events may arrive up to ~1 minute after completion. |
| URLs | Must be public https — private/internal addresses are rejected. |
✓
Respond
2xx quickly and do heavy work afterward — a slow endpoint looks like a failure and triggers retries. Verify the signature before trusting the event.Machine-readable: interactive reference · openapi.yaml · llms-api.txt. Base URL
https://api.vivideo.ai.