Build both paths. Use webhooks as the primary completion signal in production (public HTTPS endpoint, handle avatar_video.success and avatar_video.fail, update your records idempotently). Keep a polling fallback that checks GET /v3/videos/{video_id} every 10 seconds for local dev and as a safety net; if the webhook path is silent for longer than your polling timeout, fall back to the status endpoint rather than assuming failure.

Context: GitHub integration notes (mediamake HeyGen webhook setup, real production walkthrough): documents the two completion patterns. The default is the webhook: HeyGen calls your endpoint with avatar_video.success or avatar_video.fail when the video is ready, and the handler updates the database. Polling is the fallback: it runs automatically in the background every 10 seconds against the status endpoint, and it is what you use for local development without a public URL or as a safety net if a webhook never arrives. Production webhooks require a publicly accessible HTTPS endpoint with no firewall blocking the route.