create-video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreate 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 header. Set the environment variable.
X-Api-KeyHEYGEN_API_KEYbash
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-KeyHEYGEN_API_KEYbash
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 (), prefer them over direct HTTP API calls — they handle authentication and request formatting automatically.
mcp__heygen__*| Task | MCP Tool | Fallback (Direct API) |
|---|---|---|
| Generate video from prompt | | |
| Check video status / get URL | | |
| List account videos | | |
| Delete a video | | |
If no HeyGen MCP tools are available, use direct HTTP API calls as documented in the reference files.
如果HeyGen MCP工具可用(),优先使用这些工具而非直接调用HTTP API——它们会自动处理身份验证和请求格式。
mcp__heygen__*| 任务 | MCP工具 | 备选方案(直接调用API) |
|---|---|---|
| 通过提示生成视频 | | |
| 检查视频状态 / 获取视频链接 | | |
| 列出账号下的视频 | | |
| 删除视频 | | |
若没有可用的HeyGen MCP工具,请按照参考文档中的说明直接调用HTTP API。
Default Workflow
默认工作流
Always use prompt-optimizer.md guidelines to structure prompts with scenes, timing, and visual styles.
With MCP tools:
- Write an optimized prompt using prompt-optimizer.md → visual-styles.md
- Call with prompt and config (duration_sec, orientation, avatar_id)
mcp__heygen__generate_video_agent - Call with the returned video_id to poll status and get the download URL
mcp__heygen__get_video
Without MCP tools (direct API):
- Write an optimized prompt using prompt-optimizer.md → visual-styles.md
- — see video-agent.md
POST /v1/video_agent/generate - — see video-status.md
GET /v2/videos/<id>
请始终遵循prompt-optimizer.md中的指南,构建包含场景、时长和视觉风格的提示词。
使用MCP工具时:
- 参考prompt-optimizer.md → visual-styles.md编写优化后的提示词
- 调用,传入提示词和配置参数(duration_sec、orientation、avatar_id)
mcp__heygen__generate_video_agent - 使用返回的video_id调用,轮询视频状态并获取下载链接
mcp__heygen__get_video
不使用MCP工具时(直接调用API):
- 参考prompt-optimizer.md → visual-styles.md编写优化后的提示词
- 调用——详见video-agent.md
POST /v1/video_agent/generate - 调用——详见video-status.md
GET /v2/videos/<id>
Quick Reference
快速参考
| Task | MCP Tool | Read |
|---|---|---|
| Generate video from prompt | | prompt-optimizer.md → visual-styles.md → video-agent.md |
| Check video status / get download URL | | video-status.md |
| Upload reference files for prompt | — | assets.md |
| 任务 | MCP工具 | 参考文档 |
|---|---|---|
| 通过提示生成视频 | | prompt-optimizer.md → visual-styles.md → video-agent.md |
| 检查视频状态 / 获取下载链接 | | 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 Says | This Skill | Avatar 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
最佳实践
- Optimize your prompt — The difference between mediocre and professional results depends entirely on prompt quality. Always use the prompt optimizer
- Specify duration — Use for predictable length
config.duration_sec - Lock avatar if needed — Use for consistency across videos
config.avatar_id - Upload reference files — Help the agent understand your brand/product
- Iterate on prompts — Refine based on results; Video Agent is great for quick iterations
- 优化提示词——平庸结果与专业级结果的差距完全取决于提示词质量,请务必使用提示词优化工具
- 指定时长——使用参数确保视频时长符合预期
config.duration_sec - 按需锁定虚拟形象——使用参数保证多段视频的虚拟形象一致性
config.avatar_id - 上传参考文件——帮助Agent更好地理解你的品牌/产品
- 迭代优化提示词——根据生成结果不断完善提示词,Video Agent非常适合快速迭代