API Reference
Webhooks
Set up webhooks to receive real-time notifications about your video generations.
Webhooks allow you to receive notifications when your video generations complete, fail, or change status.
Setting up Webhooks
Include a webhook_url parameter when creating a generation to receive notifications.
Example with Webhook
curl -X POST "https://api.vidrouter.com/v1/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "runway-gen3",
"prompt": "A serene lake at sunset",
"webhook_url": "https://your-app.com/webhook"
}'Webhook Payload
{
"id": "gen_abc123def456",
"status": "completed",
"video_url": "https://cdn.vidrouter.com/videos/gen_abc123def456.mp4",
"created_at": "2024-01-15T10:30:00Z",
"completed_at": "2024-01-15T10:33:24Z"
}