HeyGen
HeyGen is an AI video platform. The Willow connector calls the HeyGen API (v3, https://api.heygen.com), so an agent can generate videos, translate and lip-sync existing ones, and look up the avatars, voices, templates and brand kits it needs to do that.
HeyGen also runs a remote MCP server, but its documentation says apps, MCP gateways and automation tools can't sign in to it (they get Invalid redirect_uri: not registered for this client) and recommends the API with an API key instead. This connector does exactly that.
Authentication Types
HeyGen supports 1 authentication method:
- API Key — A key you create in the HeyGen API dashboard. Willow sends it in the
X-Api-Keyheader.- Pros: Simple setup, can be limited to the scopes you need, bills to your API plan
- Cons: Shared credential rather than per-user, so HeyGen attributes actions to the key's account
Setting up an API Key
-
Open the HeyGen API keys page and click to generate a key.
-
Choose the key's permissions. A key can be full access, read-only, or limited to chosen scopes. See Permissions per tool group for what each tool needs.
-
Copy the key immediately and store it somewhere safe.
Keep your API key secret. Anyone with it can spend your HeyGen credits and read your videos. Never commit it to version control.
-
In Willow, go to MCP Servers → + Add MCP server, find the HeyGen card with the By Willow badge, and click + Use.
-
Open the Setup tab, choose API Key as the authentication type, paste the key into the token field, and click Save Changes.
-
Run Get Current User to verify. A successful response with your name, billing type and remaining credits confirms the key works.
Permissions per tool group
HeyGen scopes take the form resource:read or resource:write, and a write scope also satisfies the matching read. A key without the scope a tool needs gets a 403 insufficient_api_key_scope error. See HeyGen's scope reference.
| Tools | Scope |
|---|---|
| Get Current User | account:read |
| List Videos, Get Video, Get Prompt Video, Get Folder | videos:read |
| Delete Video, Create Avatar Video, Create Talking Photo Video, Create Prompt Video, Create Folder | videos:write |
| Get Video Agent Session, List Video Agent Sessions, List Video Agent Session Videos, List Video Agent Styles | video_agent:read |
| Create Video Agent Session, Send Video Agent Message, Stop Video Agent Session | video_agent:write |
| List Avatar Groups, List Avatar Looks, Get Avatar Look | avatars:read |
| List Voices | voices:read |
| Generate Speech | voices:write |
| Search Background Audio, Get Asset | assets:read |
| List Video Translations, Get Video Translation, List Translation Languages | translations:read |
| Create Video Translation | translations:write |
| List Lipsyncs, Get Lipsync | lipsync:read |
| Create Lipsync | lipsync:write |
| List Templates, Get Template | templates:read |
| Generate Video from Template | templates:read and videos:write |
| List Brand Kits, Get Brand Kit | brand:read |
A read-only key (*:read) covers every read tool. Creating anything needs the matching write scope, or a full-access key.
Available Tools
The HeyGen connector ships 36 tools. Tools that start a render return an id straight away: poll the matching Get tool until status is completed or failed.
Account (1 tool)
- Get Current User — the account behind the key, billing type and remaining credits or balance.
Videos (7 tools)
- List Videos — list videos, newest first, filtered by folder or title.
- Get Video — status,
video_url, thumbnail, duration and any failure reason for one video. - Delete Video — permanently delete a video.
- Create Avatar Video — a HeyGen avatar look speaks a script or lip-syncs audio.
- Create Talking Photo Video — a person in any image speaks a script or lip-syncs audio.
- Create Prompt Video — generate a 5-30 second clip with sound from a prompt, or animate an image, with HeyGen Video.
- Get Prompt Video — status and
video_urlof a Create Prompt Video clip.
Video Agent (7 tools)
- Create Video Agent Session — one prompt in, a scripted, composed and rendered video out.
generatemode runs to the end,chatmode lets you iterate. - Get Video Agent Session — status, progress,
video_idand recent chat messages. - List Video Agent Sessions — find a session id.
- List Video Agent Session Videos — every video a session produced.
- Send Video Agent Message — answer a question or ask for changes.
- Stop Video Agent Session — halt a running session at its next checkpoint.
- List Video Agent Styles — curated visual styles, filterable by tag.
Avatars (3 tools)
- List Avatar Groups — characters, each with one or more looks.
- List Avatar Looks — outfits, poses and styles. A look's
idis theavatar_idthat video creation takes. - Get Avatar Look — supported engines, orientation, default voice and training status.
Voices and audio (3 tools)
- List Voices — your own voice clones, or HeyGen's public library by language, gender or free text.
- Generate Speech — text to speech with an active voice, returns an
audio_url. - Search Background Audio — find background music or sound effects by description.
Video translation (4 tools)
- Create Video Translation — translate a video into one or more languages with voice cloning and lip-sync.
- Get Video Translation — status and
video_urlof a translation job. - List Video Translations — translation jobs, newest first.
- List Translation Languages — supported language names and the ones your plan can use.
Lipsync (3 tools)
- Create Lipsync — replace a video's audio and re-animate the speaker's lips to match.
- Get Lipsync — status and
video_urlof a lipsync job. - List Lipsyncs — lipsync jobs, newest first.
Templates (3 tools)
- List Templates — API-ready Studio templates in the workspace.
- Get Template — a template's variable schema with current defaults, and its scenes.
- Generate Video from Template — render a video by filling a template's variables.
Brand kits (2 tools)
- List Brand Kits — colors, fonts and logos available in the workspace.
- Get Brand Kit — one kit with the role each color, logo and font plays.
Assets and folders (3 tools)
- Get Asset — metadata and a public URL for an uploaded asset.
- Create Folder — create a folder to file videos and translations in.
- Get Folder — check that a folder id still exists.
Pagination
List tools take limit and token. Each response carries has_more and next_token: pass next_token back as token to read the next page. A page can hold fewer than limit items while has_more is true, so keep paging until it is false.
Credits
Tools that render or generate (every Create, Generate and Send Video Agent Message tool) spend credits on the account the key belongs to. An API key bills to your HeyGen API plan, not to a web subscription. Run Get Current User first to see the balance.
Troubleshooting
401 Unauthorized on every call
Cause: The key is missing, wrong, or was rotated or deleted.
Solution: Create a new key on the HeyGen API keys page, paste it into the connector's Setup tab, and run Get Current User again.
403 insufficient_api_key_scope
Cause: The key is limited to scopes that don't include the tool you called.
Solution: Check the permissions table and create a key with the missing scope, or a full-access key.
A video stays pending or processing
Cause: Rendering is asynchronous, and create tools return before the video exists.
Solution: Poll Get Video (or Get Prompt Video, Get Video Translation, Get Lipsync) until status is completed. On failed, read failure_code and failure_message.
A tool fails on an avatar_id or voice_id
Cause: The id doesn't come from the right list. A look's id is the avatar_id, not the avatar group's.
Solution: Take the id from List Avatar Looks (avatar_id) or List Voices (voice_id), and check that a voice is ACTIVE.