Webhooks
For production systems, webhooks are the better choice. Instead of polling, you register a URL and VideoGen sends you an event when work completes. For the full list of event types and payload schemas, see the Webhook events reference.
1. Register a webhook endpoint
The response includes a signingSecret. Save it; you’ll need it to verify incoming requests.
2. Handle workflow run events
Subscribe to workflow_run.succeeded, workflow_run.failed, and workflow_run.cancelled to track end-to-end video workflows started via POST /v1/workflows/*. When a run reaches a terminal status, VideoGen sends a POST request to your URL:
Payloads include workflowRunId, workflowType, projectId, and projectUrl. Failed events also include an error.message field. Open projectUrl in the app or export the project via the Projects API.
3. Handle tool execution events
Standalone media tools emit tool_execution.succeeded, tool_execution.failed, and tool_execution.cancelled. The success payload carries the generated files inline:
Each entry in results contains the file id, type, and a hydrated file object with signed download URLs, so no extra API call is needed. For tool_execution.failed and tool_execution.cancelled events, results is absent.
4. Verify signatures
Webhook deliveries follow the Standard Webhooks spec. Both SDKs ship a verifyWebhookSignature helper so you can confirm a request is authentic without pulling in the standardwebhooks library yourself:
TypeScript
Python
Manual
The helpers throw if the signature is invalid or the timestamp is too old, so catch the error to reject the request.
File upload webhooks
In addition to tool execution events, you can subscribe to file upload lifecycle events. These are only fired for files uploaded via the API (not the VideoGen UI).
Register for file events the same way as tool events:
Next steps
- Webhook events reference — full list of event types and payload schemas
- Webhook management API — create, list, and delete webhook endpoints programmatically