---
name: avatar-video
description: |-
  Create AI avatar videos with precise control over avatars, voices, scripts, scenes, and backgrounds using HeyGen's v2 API. Use when: (1) Choosing a specific avatar and voice for a video, (2) Writing exact scripts for an avatar to speak, (3) Building multi-scene videos with different backgrounds per scene, (4) Creating transparent WebM videos for compositing, (5) Using talking photos as video presenters, (6) Integrating HeyGen avatars with Remotion, (7) Batch video generation with exact specs, (8) Brand-consistent production videos with precise control.
homepage: https://docs.heygen.com/reference/create-a-video
allowed-tools: mcp__heygen__*
metadata:
  openclaw:
    requires:
      env:
        - HEYGEN_API_KEY
    primaryEnv: HEYGEN_API_KEY
title: avatar-video
canonical_url: https://skilld.dev/gh/openmontageinc/openmontage/avatar-video
last_updated: 2026-10-14T05:11:31.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/assets.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/assets.md), [references/avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/avatars.md), [references/backgrounds.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/backgrounds.md), [references/captions.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/captions.md), [references/dimensions.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/dimensions.md), [references/photo-avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/photo-avatars.md), [references/quota.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/quota.md), [references/remotion-integration.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/remotion-integration.md), [references/scripts.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/scripts.md), [references/templates.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/templates.md), [references/text-overlays.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/text-overlays.md), [references/video-generation.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-generation.md), [references/video-status.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-status.md), [references/voices.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/voices.md), [references/webhooks.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/webhooks.md).
>
> If the user asked to install this Skill, run `npx skilld install openmontageinc/openmontage/avatar-video`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/avatar-video`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/openmontageinc/openmontage/avatar-video) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/avatar-video`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/avatar-video --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/avatar-video --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Avatar Video

Create AI avatar videos with full control over avatars, voices, scripts, scenes, and backgrounds. Build single or multi-scene videos with exact configuration using HeyGen's `/v2/video/generate` API.

## Authentication

All requests require the `X-Api-Key` header. Set the `HEYGEN_API_KEY` environment variable.

```bash
curl -X GET "https://api.heygen.com/v2/avatars" \
  -H "X-Api-Key: $HEYGEN_API_KEY"
```

## Tool Selection

If HeyGen MCP tools are available (`mcp__heygen__*`), **prefer them** over direct HTTP API calls — they handle authentication and request formatting automatically.

| Task | MCP Tool | Fallback (Direct API) |
|------|----------|----------------------|
| Check video status / get URL | `mcp__heygen__get_video` | `GET /v2/videos/{video_id}` |
| List account videos | `mcp__heygen__list_videos` | `GET /v2/videos` |
| Delete a video | `mcp__heygen__delete_video` | `DELETE /v2/videos/{video_id}` |

Video generation (`POST /v2/video/generate`) and avatar/voice listing are done via direct API calls — see reference files below.

## Default Workflow

1. **List avatars** — `GET /v2/avatars` → pick an avatar, preview it, note `avatar_id` and `default_voice_id`. See [avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/avatars.md)
2. **List voices** (if needed) — `GET /v2/voices` → pick a voice matching the avatar's gender/language. See [voices.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/voices.md)
3. **Write the script** — Structure scenes with one concept each. See [scripts.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/scripts.md)
4. **Generate the video** — `POST /v2/video/generate` with avatar, voice, script, and background per scene. See [video-generation.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-generation.md)
5. **Poll for completion** — `GET /v2/videos/{video_id}` until status is `completed`. See [video-status.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-status.md)

## Quick Reference

| Task | Read |
|------|------|
| List and preview avatars | [avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/avatars.md) |
| List and select voices | [voices.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/voices.md) |
| Write and structure scripts | [scripts.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/scripts.md) |
| Generate video (single or multi-scene) | [video-generation.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-generation.md) |
| Add custom backgrounds | [backgrounds.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/backgrounds.md) |
| Add captions / subtitles | [captions.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/captions.md) |
| Add text overlays | [text-overlays.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/text-overlays.md) |
| Create transparent WebM video | [video-generation.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-generation.md) (WebM section) |
| Use templates | [templates.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/templates.md) |
| Create avatar from photo | [photo-avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/photo-avatars.md) |
| Check video status / download | [video-status.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-status.md) |
| Upload assets (images, audio) | [assets.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/assets.md) |
| Use with Remotion | [remotion-integration.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/remotion-integration.md) |
| Set up webhooks | [webhooks.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/webhooks.md) |

## When to Use This Skill vs Create Video

This skill is for **precise control** — you choose the avatar, write the exact script, configure each scene.

If the user just wants to **describe a video idea** and let AI handle the rest (script, avatar, visuals), use the **create-video** skill instead.

| User Says | Create Video Skill | This Skill |
|-----------|:------------------:|:----------:|
| "Make me a video about X" | ✓ | |
| "Create a product demo" | ✓ | |
| "I want avatar Y to say exactly Z" | | ✓ |
| "Multi-scene video with different backgrounds" | | ✓ |
| "Transparent WebM for compositing" | | ✓ |
| "Use this specific voice for my script" | | ✓ |
| "Batch generate videos with exact specs" | | ✓ |

## Reference Files

### Core Video Creation
- [references/avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/avatars.md) - Listing avatars, styles, avatar_id selection
- [references/voices.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/voices.md) - Listing voices, locales, speed/pitch
- [references/scripts.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/scripts.md) - Writing scripts, pauses, pacing
- [references/video-generation.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-generation.md) - POST /v2/video/generate and multi-scene videos

### Video Customization
- [references/backgrounds.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/backgrounds.md) - Solid colors, images, video backgrounds
- [references/text-overlays.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/text-overlays.md) - Adding text with fonts and positioning
- [references/captions.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/captions.md) - Auto-generated captions and subtitles

### Advanced Features
- [references/templates.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/templates.md) - Template listing and variable replacement
- [references/photo-avatars.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/photo-avatars.md) - Creating avatars from photos
- [references/webhooks.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/webhooks.md) - Webhook endpoints and events

### Integration
- [references/remotion-integration.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/remotion-integration.md) - Using HeyGen in Remotion compositions

### Foundation
- [references/video-status.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/video-status.md) - Polling patterns and download URLs
- [references/assets.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/assets.md) - Uploading images, videos, audio
- [references/dimensions.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/dimensions.md) - Resolution and aspect ratios
- [references/quota.md](https://skilld.dev/api/skills-raw/openmontageinc/openmontage/avatar-video/references/quota.md) - Credit system and usage limits

## Best Practices

1. **Preview avatars before generating** — Download `preview_image_url` so the user can see the avatar before committing
2. **Use avatar's default voice** — Most avatars have a `default_voice_id` pre-matched for natural results
3. **Fallback: match gender manually** — If no default voice, ensure avatar and voice genders match
4. **Use test mode for development** — Set `test: true` to avoid consuming credits (output will be watermarked)
5. **Set generous timeouts** — Video generation often takes 5-15 minutes, sometimes longer
6. **Validate inputs** — Check avatar and voice IDs exist before generating
