Skip to main content

What you can build

Start from your own media

Send a prompt, photo, recording or text straight to the latest HeyGen model. Nothing to set up in HeyGen first.
heygen-video

Video

HeyGen Video 1. Prompt or image to video with sound.
avatar-video

Avatar

HeyGen Avatar 6. Photo and voice to a talking video.
text-to-speech

Voice

HeyGen Voice 1. Speech from text or a recording.
professional-voice-clone

Image

HeyGen Image 1. One identity, any scene.

Build on what you set up in HeyGen

Reuse your avatars, voices, brand kits and templates, referenced by ID.
video-agent

Video

Avatar video, Video Agent, Studio, Templates.
create-avatar

Avatar and Voice

Your avatars and voice clones.
look-packs

Brand

Brand kits and glossaries.
hero

Realtime Video

Live, conversational avatars.
video-translation

Video Translation

175+ languages with lip-sync.
voice-clone

Lipsync

New audio on an existing video.
hyperframes

Tools

Music, sound effects, clipping, cleanup.
templates

Batches

Up to 100 requests in one call.

Start with your agent

Paste this into Claude Code, Codex, or Cursor. It reads the whole API, sets up your key, and makes your first video with you.
Prompt for your agent

Your first video

Get your API key

Create a key in the API dashboard. Every request below needs it.

Try it in the Playground

Fire a real request from your browser before writing any code.
Base URL https://api.heygen.com · Auth header X-Api-Key: <your-key>

Authenticate

Create a key in the API keys page. For key rotation, see the API Key guide.

Create a video

Call a model directly. Pass public URLs for your photo and recording, or upload them and pass an asset_id.
A photo and a voice recording become a talking video. See HeyGen Avatar 6.
Response

Get the result

Both models return their video on GET /v3/models/videos/{video_id}. Poll until status is completed, then download video_url.
Response (completed)
Ready to reuse your own avatar or voice? Create an avatar once, then render it by avatar_id with POST /v3/videos.

Working from an agent or terminal?

Skip the raw HTTP. Both surfaces wrap the same API.

MCP Server

Plug HeyGen into Claude, Cursor, or any MCP-capable agent. It handles the calls for you.

CLI

heygen video create, heygen video download. Scriptable from any shell or CI job.

Build with your stack

Webhooks

Authentication

Usage Limits

Still calling v1/v2? Those endpoints passed their October 31, 2026 sunset and are being removed. Calls to them may fail intermittently, so move to v3: see the version comparison.

Troubleshooting

Inspect failure_code and failure_message on GET /v3/videos/{video_id}. Full catalog in Error Codes.
Confirm the X-Api-Key header is set and the key is active in the API keys page.
Rate or concurrency limit hit. Respect Retry-After and back off. Enterprise plans get higher limits; see Usage Limits.
A URL you passed couldn’t be fetched. It must be publicly accessible and point directly at the file.