Usage Guide

How It Works

When working with HeyGen code, Claude Code will automatically reference the skill files to provide accurate, up-to-date guidance.

Example Prompts

Here are some example prompts you can use with Claude Code:

"Create a 60-second product demo video using the Video Agent API"

"Help me generate a HeyGen video with a custom background"

"How do I list available avatars in HeyGen?"

"Create a video translation workflow for Spanish and French"

"Set up webhooks for video completion notifications"

"Use the prompt optimizer to create a scene-by-scene script for my video"

Video Agent Workflow

For quick video generation from a text prompt:

  1. Use the prompt-optimizer.md guidelines to structure your prompt with scenes, timing, and visual styles
  2. Call the Video Agent API endpoint (POST /v1/video_agent/generate)
  3. Poll for status using video-status.md patterns
  4. Download the completed video

Common Tasks

Generate a Video from a Prompt (Easy Way)

  1. Review prompt-optimizer.md to learn how to write effective prompts
  2. Use the Video Agent API endpoint for one-shot generation
  3. Poll for completion status

Generate a Video with Precise Control

  1. List available avatars using GET /v2/avatars
  2. List available voices using GET /v2/voices
  3. Create your video using POST /v2/video/generate
  4. Poll for status using GET /v1/video_status.get

Add Captions or Text Overlays

Reference the captions.md and text-overlays.md files for guidance on:

  • Auto-generated captions and subtitles
  • Adding text with custom fonts and positioning

Real-time Interactive Avatar

Use the streaming-avatars.md reference for setting up real-time interactive avatar sessions.

Translate or Dub an Existing Video

The video-translation.md file covers:

  • Video translation workflows
  • Multi-language dubbing

Contributing

To add or update references:

  1. Edit the relevant .md file in skills/heygen/references/
  2. Update skills/heygen/SKILL.md if adding new files
  3. Include both curl and TypeScript/Python examples where applicable
  4. Test that the skill loads correctly