Practical overview
When it fits
Use HeyGen when a development workflow needs programmatic video or speech generation, or when an application needs to reuse HeyGen media resources by ID.
Who it is for
- Developers integrating video or speech generation into applications.
- Teams producing repeatable product education, onboarding, or partner-training videos from application data.
- Builders using API calls, the documented CLI, or an MCP-capable agent to work with HeyGen.
Documented uses
- Turn a person’s photo and a recording into a talking video.
- Generate a video from a text prompt or image.
- Create speech from text.
- Translate video with lip-sync.
- Reuse HeyGen avatars, voices, brand kits, and templates by ID.
Requirements & limits
The developer homepage states that there is a free entry point and pay-as-you-go pricing starting at $5. API requests use a HeyGen API key; the quick-start directs developers to create one in the API dashboard. Usage limits apply, with higher limits stated for enterprise plans.
- Choose the endpoint based on the available input: photo and recording for Avatar 6, prompt or image for HeyGen Video, or text for Voice.
- Media URLs must be publicly accessible and point directly to the file; uploaded assets can instead be referenced by asset ID.
- The quick-start describes batches of up to 100 requests in one call.
- New integrations should use v3: the documentation says v1 and v2 passed their October 31, 2026 sunset and may fail intermittently.
- The CLI and MCP server wrap the same API; direct API calls are also documented.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Create and retrieve a prompt-based video with v3
Submit a text-to-video request and retrieve the resulting video URL.
Before you start
- A HeyGen API key stored in the HEYGEN_API_KEY environment variable.
- A video prompt; the documented example also supplies duration and aspect ratio.
Steps
Send a POST request to /v3/models/videos with model heygen-video-1, mode text_to_video, a prompt, duration, and aspect_ratio.
Read the video_id from the response.
Poll GET /v3/models/videos/{video_id} until the status is completed, failed, or cancelled.
When completed, use the returned video_url.
Expected outcome
A completed video response includes a video URL and duration.
Guide limitations
- The guide’s example uses a five-second video with a 16:9 aspect ratio; it does not establish other parameter limits.
- Requests require the API key in the X-Api-Key header.
Create a talking video from a photo and recording
Submit a person’s photo and voice recording to the Avatar 6 model and retrieve the video result.
Before you start
- A HeyGen API key stored in the HEYGEN_API_KEY environment variable.
- A photo URL and recording URL that are publicly accessible and point directly to files, or uploaded media referenced by asset_id.
Steps
Send a POST request to /v3/models/avatars using model heygen-avatar-6, a reference image, and audio input.
Read the video_id from the response.
Poll GET /v3/models/videos/{video_id} until processing finishes.
Use the video_url returned when the status is completed.
Expected outcome
A completed response provides the generated talking video URL.
Guide limitations
- The documented example supplies a photo and an existing voice recording; generating speech from a script is a separate Voice-model step.
- The quick-start does not specify a completion time.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 21 November 2026
- Original website title
- HeyGen Developers - AI Video API for Developers · Official homepage title · retained in its source language

