heygen-best-practices

Generate AI avatar videos with the HeyGen API using documented integration patterns.

30.5k|3.5k|Updated Jul 4, 2025
One-click install
npx skills add https://github.com/davila7/claude-code-templates --skill heygen-best-practices
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: heygen-best-practices
Source: https://github.com/davila7/claude-code-templates/tree/main/cli-tool/components/skills/development/heygen-best-practices
Command: npx skills add https://github.com/davila7/claude-code-templates --skill heygen-best-practices

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Integrating with the HeyGen API for AI avatar video generation involves many endpoints, authentication rules, quota limits, and configuration options that are easy to get wrong. This Skill provides structured, code-ready guidance so you can build correct HeyGen integrations without trial and error.

Core Features & Use Cases

  • Video Generation Workflows: Covers the POST /v2/video/generate flow, multi-scene videos, Video Agent one-shot generation, and status polling with download URLs.
  • Avatar and Voice Management: Lists avatars, retrieves default_voice_id for natural lip sync, handles talking photos, Avatar IV, and AI-generated photo avatars.
  • Customization and Advanced Features: Backgrounds, text overlays, captions, dimensions for each platform, video translation, streaming avatars, webhooks, and Remotion composition integration.
  • Use Case: You need to generate a 1080p portrait product demo video with a professional avatar and captions for TikTok. The Skill guides you through avatar selection, default voice lookup, dimension configuration, and polling for the finished video.

Quick Start

Ask the AI to generate a HeyGen avatar video from a script using the heygen-best-practices guidance, specifying your avatar, voice, and target platform dimensions.

Frequently Asked Questions about heygen-best-practices

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an AI avatar video with the HeyGen API?

Send a POST request to /v2/video/generate with video_inputs containing a character (avatar_id and avatar_style), a voice (text input and voice_id), and a dimension object. Poll the status endpoint until the video completes, then retrieve the download URL.

How do I choose the right voice for a HeyGen avatar?

Fetch the avatar's details via GET /v2/avatar/{avatar_id}/details and use its default_voice_id. Default voices are pre-matched by HeyGen for gender and lip sync quality, avoiding manual voice selection errors.

What video dimensions does HeyGen support for TikTok and YouTube?

HeyGen supports 1920x1080 landscape for YouTube, 1080x1920 portrait for TikTok and Reels, and 1080x1080 square for Instagram feeds. Both 720p and 1080p resolutions are available, with 1080p consuming roughly 1.5x the credits.

Can I create a talking avatar from a photo with HeyGen?

Yes, upload a photo as an asset, create a talking photo via POST /v2/talking_photo, then reference the talking_photo_id in video generation. For higher quality, use the Avatar IV endpoint with orientation and motion prompt options.

Why is my HeyGen video generation request failing?

Common causes include invalid or missing X-Api-Key header, insufficient remaining quota, or mismatched voice and avatar genders. Check remaining credits via /v1/video_generate.quota before generating and validate avatar IDs against the list endpoint.

How do I use HeyGen avatar videos in Remotion compositions?

Generate the video with matching dimensions, then use OffthreadVideo instead of Video for frame-accurate rendering. For transparent overlays, use the /v1/video.webm endpoint and apply circular masks via CSS border-radius.