Skip to main content
Webhooks allow your system to receive instant HTTP notifications when long-running asynchronous tasks (such as background responses, batch processing, or video generation) complete or transition states without continuous polling.

Webhook Architecture

  1. Register Endpoint: Add your server URL and select subscribed events via the Webhooks Dashboard.
  2. Store Secret: Secure the whsec_... signing secret generated upon creation.
  3. Verify Signature: Validate the webhook-signature header on your server using the Standard Webhooks specification before processing payloads.

Configuring Webhooks via Dashboard

Webhook registration and lifecycle management are handled visually via the Webhooks Dashboard:
  1. Sign in to your account and navigate to the Webhooks section in the dashboard.
  2. Click Add Webhook.
  3. Provide your server’s public Endpoint URL (must be a publicly accessible https:// or http:// destination).
  4. Select the Events you want to receive (e.g., response.completed, batch.completed, video.completed).
  5. Click Save and copy the generated Signing Secret (whsec_...). Save this secret in your server environment variables.
  6. Use the Send Test button to dispatch a mock webhook.test event and confirm your endpoint handles deliveries with HTTP 200 OK.
The signing secret (whsec_...) is shown only once when creating an endpoint. If lost, delete the endpoint and create a new one to generate a new secret.

Supported Events

Payload Structure & Headers

Deliveries are dispatched as HTTP POST requests formatted as standard JSON conforming to Standard Webhooks:
Every delivery includes three verification headers:

Signature Verification Examples

Use the official standardwebhooks package to verify payload signatures before processing events:
Always verify the signature against the raw byte body before parsing into a JSON object to prevent byte order divergence.

Delivery Retries & Security

  1. Immediate Acknowledgment (HTTP 2xx): Your server must acknowledge reception with HTTP 200 OK within seconds. Heavy computations should be deferred to internal workers.
  2. Exponential Backoff Retries: If your server returns non-2xx codes or times out, the gateway retries delivery automatically with exponential backoff.
  3. SSRF Guardrails: Loopback destinations (localhost, 127.0.0.1), private RFC 1918 subnets, and link-local targets are blocked by default.

Next Steps