create-video

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Create Video

生成视频

Generate complete videos from a text prompt. Describe what you want and the AI handles script writing, avatar selection, visuals, voiceover, pacing, and captions automatically.
通过文本提示生成完整视频。只需描述你的需求,AI会自动完成脚本撰写、虚拟形象选择、视觉制作、旁白录制、节奏把控和字幕添加等工作。

Authentication

身份验证

All requests require the
X-Api-Key
header. Set the
HEYGEN_API_KEY
environment variable.
bash
curl -X POST "https://api.heygen.com/v1/video_agent/generate" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Create a 60-second product demo video."}'
所有请求均需携带
X-Api-Key
请求头。请设置
HEYGEN_API_KEY
环境变量。
bash
curl -X POST "https://api.heygen.com/v1/video_agent/generate" \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Create a 60-second product demo video."}'

Tool Selection

工具选择

If HeyGen MCP tools are available (
mcp__heygen__*
), prefer them over direct HTTP API calls — they handle authentication and request formatting automatically.
TaskMCP ToolFallback (Direct API)
Generate video from prompt
mcp__heygen__generate_video_agent
POST /v1/video_agent/generate
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}
If no HeyGen MCP tools are available, use direct HTTP API calls as documented in the reference files.
如果HeyGen MCP工具可用(
mcp__heygen__*
),优先使用这些工具而非直接调用HTTP API——它们会自动处理身份验证和请求格式。
任务MCP工具备选方案(直接调用API)
通过提示生成视频
mcp__heygen__generate_video_agent
POST /v1/video_agent/generate
检查视频状态 / 获取视频链接
mcp__heygen__get_video
GET /v2/videos/{video_id}
列出账号下的视频
mcp__heygen__list_videos
GET /v2/videos
删除视频
mcp__heygen__delete_video
DELETE /v2/videos/{video_id}
若没有可用的HeyGen MCP工具,请按照参考文档中的说明直接调用HTTP API。

Default Workflow

默认工作流

Always use prompt-optimizer.md guidelines to structure prompts with scenes, timing, and visual styles.
With MCP tools:
  1. Write an optimized prompt using prompt-optimizer.mdvisual-styles.md
  2. Call
    mcp__heygen__generate_video_agent
    with prompt and config (duration_sec, orientation, avatar_id)
  3. Call
    mcp__heygen__get_video
    with the returned video_id to poll status and get the download URL
Without MCP tools (direct API):
  1. Write an optimized prompt using prompt-optimizer.mdvisual-styles.md
  2. POST /v1/video_agent/generate
    — see video-agent.md
  3. GET /v2/videos/<id>
    — see video-status.md
请始终遵循prompt-optimizer.md中的指南,构建包含场景、时长和视觉风格的提示词。
使用MCP工具时:
  1. 参考prompt-optimizer.mdvisual-styles.md编写优化后的提示词
  2. 调用
    mcp__heygen__generate_video_agent
    ,传入提示词和配置参数(duration_sec、orientation、avatar_id)
  3. 使用返回的video_id调用
    mcp__heygen__get_video
    ,轮询视频状态并获取下载链接
不使用MCP工具时(直接调用API):
  1. 参考prompt-optimizer.mdvisual-styles.md编写优化后的提示词
  2. 调用
    POST /v1/video_agent/generate
    ——详见video-agent.md
  3. 调用
    GET /v2/videos/<id>
    ——详见video-status.md

Quick Reference

快速参考

TaskMCP ToolRead
Generate video from prompt
mcp__heygen__generate_video_agent
prompt-optimizer.mdvisual-styles.mdvideo-agent.md
Check video status / get download URL
mcp__heygen__get_video
video-status.md
Upload reference files for promptassets.md
任务MCP工具参考文档
通过提示生成视频
mcp__heygen__generate_video_agent
prompt-optimizer.mdvisual-styles.mdvideo-agent.md
检查视频状态 / 获取下载链接
mcp__heygen__get_video
video-status.md
上传提示词参考文件assets.md

When to Use This Skill vs Avatar Video

本技能与Avatar Video技能的适用场景对比

This skill is for prompt-based video creation — describe what you want, and the AI handles the rest.
If the user needs precise control over specific avatars, exact scripts, per-scene voice/background configuration, or multi-scene composition, use the avatar-video skill instead.
User SaysThis SkillAvatar Video 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"
本技能适用于基于提示词的视频创作——只需描述需求,其余工作由AI完成。
如果用户需要对特定虚拟形象、精确脚本、逐场景语音/背景配置或多场景合成进行精准控制,请使用avatar-video技能。
用户需求本技能Avatar Video技能
“帮我做一个关于X的视频”
“制作一个产品演示视频”
“我想要虚拟形象Y准确说出Z内容”
“制作包含不同背景的多场景视频”
“用于合成的透明背景WebM视频”

Reference Files

参考文件

Core Workflow

核心工作流

  • references/prompt-optimizer.md - Writing effective prompts (core workflow + rules)
  • references/visual-styles.md - 20 named visual styles with full specs
  • references/prompt-examples.md - Full production prompt example + ready-to-use templates
  • references/video-agent.md - Video Agent API endpoint details
  • references/prompt-optimizer.md - 编写高效提示词的指南(核心工作流+规则)
  • references/visual-styles.md - 20种命名视觉风格及完整规格
  • references/prompt-examples.md - 完整的生产级提示词示例+可直接使用的模板
  • references/video-agent.md - Video Agent API端点详情

Foundation

基础文档

  • references/video-status.md - Polling patterns and download URLs
  • references/webhooks.md - Webhook endpoints and events
  • references/assets.md - Uploading images, videos, audio as references
  • references/dimensions.md - Resolution and aspect ratios
  • references/quota.md - Credit system and usage limits
  • references/video-status.md - 轮询模式与下载链接说明
  • references/webhooks.md - Webhook端点与事件说明
  • references/assets.md - 上传图片、视频、音频作为参考文件的指南
  • references/dimensions.md - 分辨率与宽高比说明
  • references/quota.md - 积分体系与使用限制说明

Best Practices

最佳实践

  1. Optimize your prompt — The difference between mediocre and professional results depends entirely on prompt quality. Always use the prompt optimizer
  2. Specify duration — Use
    config.duration_sec
    for predictable length
  3. Lock avatar if needed — Use
    config.avatar_id
    for consistency across videos
  4. Upload reference files — Help the agent understand your brand/product
  5. Iterate on prompts — Refine based on results; Video Agent is great for quick iterations
  1. 优化提示词——平庸结果与专业级结果的差距完全取决于提示词质量,请务必使用提示词优化工具
  2. 指定时长——使用
    config.duration_sec
    参数确保视频时长符合预期
  3. 按需锁定虚拟形象——使用
    config.avatar_id
    参数保证多段视频的虚拟形象一致性
  4. 上传参考文件——帮助Agent更好地理解你的品牌/产品
  5. 迭代优化提示词——根据生成结果不断完善提示词,Video Agent非常适合快速迭代