# HeyGen setup for PopMCP

You paste one value into PopMCP: the HeyGen API key created in Settings, API, which PopMCP sends as the X-Api-Key header.

- Auth: API credentials
- Setup time: 2 min
- API base URL: https://api.heygen.com
- Credentials screen: https://app.heygen.com/home?from=&nav=API
- Provider docs: https://docs.heygen.com/reference/authentication

## Before you begin

- A HeyGen account you can sign into at app.heygen.com
- Access to the workspace whose credits PopMCP should spend. Keys are issued per workspace.
- Credits or a wallet balance on that workspace. Every render draws the balance down.

## Get your credentials

### 1. Open the API dashboard

Sign in at app.heygen.com and open Settings, then API. The direct link is `https://app.heygen.com/home?from=&nav=API`.

Screen: https://app.heygen.com/home?from=&nav=API

### 2. Create the key and copy it

Click Create new key, name it PopMCP, and copy the value straight away.

Screen: https://app.heygen.com/home?from=&nav=API

### 3. Check the key works

Run `curl -X GET "https://api.heygen.com/v3/users/me" -H "X-Api-Key: $HEYGEN_API_KEY"`. A 200 with your account details confirms the key is live.

### 4. Paste the key into PopMCP

Enter the value in API key on PopMCP's HeyGen form, then save.

## Fields PopMCP asks for

- API key (apiKey) [required]: HeyGen dashboard → Settings → API (or Space Settings → API Token). Sent as the X-Api-Key header. Stored encrypted; used server-side only. The connection is locked to this key's account.

## Verify

PopMCP shows HeyGen as Connected and the avatar and voice listing tools return your workspace's avatars and voices instead of an authentication error.

## Troubleshooting

### 401 unauthorized

Cause: The key was mistyped, truncated, or deleted from Settings, API.

Fix: Create a fresh key, copy it with the copy button, and re-save the PopMCP connection.

### You closed the dialog before copying the key

Cause: The full value is only shown at creation time.

Fix: Delete that key on the API page and create a new one.

### Videos fail with an insufficient-credits error

Cause: The workspace behind the key has no remaining credits or wallet balance.

Fix: Top up the wallet, or issue a key from a workspace that has credits.

### 429 Too Many Requests

Cause: A rate limit was hit, or more than 10 video jobs are running at once on Pay-as-you-go.

Fix: Wait for the Retry-After interval, let running renders finish, or ask HeyGen to raise the quota.

### Tools see the wrong avatars

Cause: The key was created while a different workspace was selected.

Fix: Switch to the correct workspace in app.heygen.com and create a new key there.

---

Source: https://www.docs.popmcp.com/docs/integrations/heygen/