Generate the avatar video
Create the talking-head clip with Poll
POST /v3/videos. Pick an engine — Avatar IV (default), Avatar V (highest fidelity), or Avatar III — then poll until it’s completed and keep the video_url.GET /v3/videos/{video_id} until status is completed, then read video_url. See the Digital Twin guide for the full request-and-poll flow.Find background music
Search the music catalog with a plain-language description and take the top track’s
audio_url (Background music).Find sound effects
Same endpoint, with
type=sound_effects — grab a whoosh for your title reveal or a chime for a stat pop (Sound effects).Each
audio_url is a short-lived pre-signed link. Feed it straight into the render step below rather than caching it.Compose the scene in Hyperframes
Build a composition that arranges the avatar clip and audio inside a designed frame. Expose each asset URL as a composition variable so you can inject the URLs from steps 1–3 at render time — the same bundle then works for any avatar clip and any track.
index.html
The exact media, timing, and audio APIs live in the Hyperframes developer docs — the snippet above is illustrative. For design patterns, see the Hyperframes cookbook.
Render the finished video
Package the composition as a Poll
.zip, then submit it to POST /v3/hyperframes/renders, passing the URLs from the earlier steps as variables. HeyGen renders the composed scene — avatar, graphics, music, and SFX baked into one file.GET /v3/hyperframes/renders/{render_id} until status is completed and download the final video_url. Full render options are in Hyperframes Cloud Rendering.End-to-end example
Related
- Introduction to Hyperframes — what the framework is and how compositions work
- Hyperframes Cloud Rendering — the full render API, parameters, and webhooks
- Generate Avatar Video · Background music · Sound effects

