Skip to main content
The HeyGen API gives you the pieces — a talking avatar, background music, and sound effects. Hyperframes composites them into one video: drop the avatar clip into a designed scene, add graphics, score it, and render to a single MP4. This guide wires all four APIs into one pipeline:
1

Generate the avatar video

Create the talking-head clip with 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.
Poll 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.
2

Find background music

Search the music catalog with a plain-language description and take the top track’s audio_url (Background music).
3

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.
4

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.
5

Render the finished video

Package the composition as a .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.
Poll 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

Every step here is also available through the HeyGen MCP, so an agent can run the whole avatar → audio → compose → render pipeline on its own.