webhooks
receive real-time notifications of video generation updates.
why use webhooks
webhooks offer an efficient way to receive real-time updates on your video generation jobs. instead of repeatedly polling for the status updates, webhooks notify you immediately when a job completes or fails.
integrating webhooks
to utilize webhooks:
- specify a
webhookUrl
parameter when calling an api endpoints that support it. - ensure your webhook endpoint can receive and handle HTTP
POST
requests.
for security purposes, your webhook URL must be configured to accept and process HTTPS POST
requests.
when a job finishes (successfully or not), we’ll send an HTTP POST
request to your specified webhookUrl
with the job details.
webhook payload
the webhook payload matches the format of the corresponding GET
request for the job. for example, a webhook for the POST /generate
endpoint will return data identical to the GET /generate/{id}
endpoint:
by leveraging webhooks, you can streamline your workflow with non-blocking calls, allowing you to focus on other tasks while receiving job completion notifications.