Heygen avatar video

From calesthio/generative-media-skills · View interactive version

Heygen avatar video is an AI agent skill from the GitHub repository calesthio/generative-media-skills. Produce HeyGen avatar videos with Direct Video, Video Agent, Digital Twin, Avatar Realtime, and related avatar/voice/asset APIs. Use for provider routing, avatar and voice selection, script-to-video workflows, lip-sync from audio, backgrounds/scenes, callbacks and polling, consent and rights checks,

How to use this skill

Skill file

HeyGen avatar video production

Use this skill when the production path is HeyGen and the deliverable involves an AI presenter, digital twin, photo avatar, studio avatar, prompt-composed avatar clip, or real-time streaming avatar. Treat HeyGen as both a creative video tool and a likeness-handling system: lock consent, identity rights, script intent, voice rights, and output custody before generation.

Facts below were verified from official HeyGen documentation and policy pages on 2026-07-10. Recheck the linked docs for volatile fields such as prices, engine support, endpoint shapes, limits, status values, moderation policy, and plan entitlements before a paid run.

Choose the right HeyGen route

Prefer the most controllable API that still fits the brief.

Official routing basis: HeyGen's "Choosing the Right Video API" docs distinguish Video Agent as prompt-driven/low-control, Direct Video as structured/high-control, and Cinematic Avatar as prompt + avatar looks with no spoken voice. Official Avatar Realtime docs describe the real-time HLS path as separate from rendered video.

Preflight checklist

Before generating:

  1. Confirm authentication path and billing pool.
  1. Decide the API route above and record why.
  2. Inventory available avatar looks with GET /v3/avatars/looks; pass the look ID as avatar_id, not the avatar group ID.
  3. Inventory voices with GET /v3/voices; filter by language, gender, type, and engine when needed. If using the TTS endpoint, HeyGen docs call out engine=starfish voices.
  4. Verify consent state for any digital twin. Do not generate with a real person's likeness unless the subject's permission and HeyGen consent requirements are satisfied.
  5. Estimate cost using output duration and selected feature. Pricing is volatile; verify current API or enterprise pricing immediately before batch or paid production.
  6. Confirm resource limits and file accessibility:
  1. Set lifecycle strategy: callback URL, polling cadence, failure handling, local artifact storage, and presigned URL download before expiry.
  2. Define QA acceptance criteria before render: pronunciation, lip-sync, identity/likeness, gesture appropriateness, brand/background, captions, aspect ratio, and safety/moderation status.

Avatar, look, and consent handling

HeyGen separates avatar groups from avatar looks. A group is a character identity; a look is the renderable outfit/pose/style. In video creation, avatar_id should be the look ID.

Digital twins depict real identifiable people and require explicit consent handling. HeyGen's consent docs state that digital twins require proof that the depicted person agreed to be cloned, while photo avatars and prompt avatars do not require the same digital-twin consent flow. Available consent levels, verified 2026-07-10:

Production rules:

Engine selection for Direct Video

For POST /v3/videos avatar renders, HeyGen v3 supports Avatar III, Avatar IV, and Avatar V engines. Verified 2026-07-10:

Heuristic: for a compliance-reviewed corporate or training presenter, use Avatar IV unless Avatar V is explicitly supported and the user values maximum likeness/motion fidelity or video-avatar gesture prompting enough to pay for it. For photo-avatar experimentation, check whether Avatar III or IV better matches the available look and cost constraints.

Script and performance direction

Write for a human presenter, not for a voiceover pasted onto a face.

Script shape for avatar video:

Avoid:

Direct Video request pattern

Use this pattern for controlled rendered videos:

{
  "type": "avatar",
  "avatar_id": "LOOK_ID",
  "voice_id": "VOICE_ID",
  "script": "Hi, I'm Maya. In the next thirty seconds, I'll show you how Acme reduces invoice review from days to minutes.",
  "title": "Acme invoice review intro",
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "background": {
    "asset_id": "BACKGROUND_ASSET_ID"
  },
  "caption": {
    "file_format": "srt",
    "style": "default"
  },
  "engine": {
    "type": "avatar_iv"
  },
  "callback_url": "https://example.com/webhooks/heygen",
  "callback_id": "project-scene-001"
}

Production notes:

Video Agent prompt pattern

Use Video Agent when speed and creative automation beat exact control. The prompt should still specify business constraints; do not leave brand, audience, duration, or compliance-sensitive claims implicit.

Example prompt:

Create a 45-second avatar-led onboarding video for a B2B SaaS feature launch.
Audience: finance operations managers.
Goal: explain that Acme Review flags duplicate invoices before payment.
Tone: calm, credible, lightly upbeat; no hype.
Structure: 5-second hook, one pain point, three product benefits, one concrete example, CTA to book a demo.
Visual style: clean enterprise software, soft blue/white palette, no exaggerated gestures.
Must say: "duplicate invoice checks run before the payment batch is approved."
Avoid: guarantees of fraud prevention, competitor claims, fake customer quotes, legal advice.
Output: 16:9, captions on.

If the user needs exact wording, do not rely on Video Agent's script writing for final output. Use it to explore concepts, then rebuild as Direct Video with the approved script and explicit assets.

Avatar Realtime production pattern

Use Avatar Realtime for live spoken avatars, not MP4 delivery. Official docs describe three speech drivers: tts, audio, and text_stream; sessions are played from HLS.

For text_stream, plan the upstream system:

QA for realtime includes startup latency, interruption behavior, stream stability, HLS player compatibility, end_reason/error messages, and whether the avatar's spoken response remains aligned with the user's actual question.

Backgrounds, scenes, captions, and brand

HeyGen Direct Video gives structured control over a single avatar render; do not assume it is a full editor unless the selected route supports scenes/templates. For multi-scene brand videos:

Artifact custody:

Polling, callbacks, failures

Rendered video generation is asynchronous. Official docs list video statuses including pending, processing, completed, and failed; completed responses include a video_url, and failed responses include failure details. Use callbacks for scale and polling for simple runs.

Failure triage:

Retry policy:

Safety, policy, and truthful disclosure

HeyGen's current official pages require users to comply with its Terms and Acceptable Use/Moderation Policy and emphasize consent for custom avatars/digital twins. Build your own production gate:

QA review rubric

Review the downloaded video before delivery:

Complete example: controlled product-launch spokesperson

Intent: produce a deterministic 30-second product-launch video with an approved company presenter look.

Approach:

  1. Confirm presenter consent and ownership for the private digital-twin look.
  2. List avatar looks and voices; choose the approved look and brand voice.
  3. Check GET /v3/avatars/looks/{look_id} for supported engines; use Avatar IV if Avatar V is not listed.
  4. Upload the approved office background to Assets API if it is not already public and stable.
  5. Generate via Direct Video with callback and captions.
  6. Download and QA the final MP4.

Example payload:

{
  "type": "avatar",
  "avatar_id": "maya_launch_look_01",
  "voice_id": "en_us_brand_voice_02",
  "script": "Today we're launching Acme Review. It checks every invoice before the payment batch is approved, flags likely duplicates, and gives your team a clear review queue. If you already use Acme Pay, you can turn it on from settings today.",
  "title": "Acme Review launch - approved spokesperson",
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "background": { "asset_id": "asset_office_soft_blue" },
  "caption": { "file_format": "srt", "style": "default" },
  "engine": { "type": "avatar_iv" },
  "callback_url": "https://video.example.com/hooks/heygen",
  "callback_id": "acme-review-launch-v1"
}

Why this works: the approved script avoids unverifiable guarantees, Avatar IV is a broad default for a controlled spokesperson render, the callback ID supports custody, and Direct Video preserves exact wording. If the approved digital-twin look supports Avatar V and gesture prompting is important, switch the engine after verifying support and then add a restrained motion_prompt.

Likely failure modes: unsupported private look, pending digital-twin consent, pronunciation of product names, captions colliding with lower thirds, or moderation review if claims imply fraud detection guarantees.

Complete example: localized training module

Intent: convert an English HR training presenter into Spanish and French variants while preserving the approved visual identity.

Approach:

  1. Treat each language as a new script adaptation, not a literal translation.
  2. Keep the same avatar look only if rights cover localized use.
  3. Select voices by target locale and review pronunciation for names, policy terms, and acronyms.
  4. Generate one Direct Video per language using locale-appropriate script and voice settings.
  5. QA native-language timing, lip-sync, captions, and policy wording.

Example Spanish script segment:

Hola. En este modulo repasaremos como reportar un conflicto de intereses antes de aprobar una compra. Si tienes dudas, pausa el video y consulta la politica interna en el portal de cumplimiento.

Example payload differences:

{
  "voice_id": "es_es_training_voice_01",
  "voice_settings": {
    "speed": 0.95,
    "pitch": 0,
    "volume": 1,
    "locale": "es-ES"
  },
  "caption": {
    "file_format": "srt",
    "style": "default"
  }
}

Why this works: the slightly slower speed gives captions and lip-sync more room, while separate scripts preserve compliance language in each market.

Likely failure modes: too-long translated sentences, formal/informal pronoun mismatch, cloned voice not licensed for all regions, and text overflow in captions.

Complete example: live concierge avatar

Intent: place an avatar face on a live support assistant in a kiosk.

Approach:

  1. Use Avatar Realtime, not rendered Direct Video.
  2. Select a stock or authorized avatar look and an appropriate voice.
  3. Open a text_stream session.
  4. Poll until the HLS URL is live.
  5. Stream short answer chunks after the application's own STT, LLM, retrieval, and safety checks.
  6. Cancel/close sessions on idle or kiosk reset.

Example initial request:

{
  "type": "text_stream",
  "avatar_id": "concierge_stock_look_07",
  "voice_id": "en_us_warm_support_03",
  "text": "Hi, I'm here to help. What can I find for you today?"
}

Example text append:

{
  "text": "The returns desk is on level two, near the west elevators."
}

Why this works: Avatar Realtime only handles the talking face and voice stream; the application remains responsible for retrieval accuracy, safety filtering, and conversation state.

Likely failure modes: idle timeout, too many concurrent sessions, HLS playback issues on the kiosk browser, long LLM responses queued after the user changes topics, or the avatar appearing to make commitments the system cannot fulfill.

Official and authoritative sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.