Integrations / HeyGen
HeyGen
AI avatar videos: browse avatar looks and voices, create videos and check their status.
6 actions
API key
5 read1 write
Calls api.heygen.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "heygen" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Create avatar videowriteheygen.create_videoCreate an avatar video from a script, avatar look id and voice id. Rendering is asynchronous and consumes credits; poll with get_video.
| Input | Type | Description | |
|---|---|---|---|
avatar_id | string | Required | Avatar look id from list_avatar_looks |
voice_id | string | Required | Voice id from list_voices |
script | string | Required | What the avatar says |
title | string | Optional | Display name in the HeyGen dashboard |
resolution | string | Optional | Output resolution |
aspect_ratio | string | Optional | Aspect ratio |
await setu.execute({
userId: "user_1",
action: "heygen.create_video",
input: {
"avatar_id": "<avatar_id>",
"voice_id": "<voice_id>",
"script": "<script>"
},
});Get current userreadheygen.get_current_userGet the account's profile, billing type and remaining credit balance for this API key.
No input.
await setu.execute({
userId: "user_1",
action: "heygen.get_current_user",
input: {},
});Get video statusreadheygen.get_videoGet a video's status (pending, processing, completed, failed) and, when completed, its video URL and duration.
| Input | Type | Description | |
|---|---|---|---|
video_id | string | Required | Video id returned by create_video |
await setu.execute({
userId: "user_1",
action: "heygen.get_video",
input: {
"video_id": "<video_id>"
},
});List avatar looksreadheygen.list_avatar_looksList avatar looks (outfits/styles). A look's id is the avatar_id to use when creating a video.
| Input | Type | Description | |
|---|---|---|---|
group_id | string | Optional | Only looks of this avatar group |
avatar_type | string | Optional | Avatar type |
ownership | string | Optional | public (HeyGen presets) or private (your own) |
limit | integer | Optional | Results per page, 1 to 50 (default 20) |
token | string | Optional | next_token from a previous page |
await setu.execute({
userId: "user_1",
action: "heygen.list_avatar_looks",
input: {},
});List avatar groupsreadheygen.list_avatarsList avatar groups (characters), each with the number of looks it has.
| Input | Type | Description | |
|---|---|---|---|
ownership | string | Optional | public or private |
limit | integer | Optional | Results per page, 1 to 50 (default 20) |
token | string | Optional | next_token from a previous page |
await setu.execute({
userId: "user_1",
action: "heygen.list_avatars",
input: {},
});List voicesreadheygen.list_voicesList and filter voices by language and gender. A voice_id is used when creating a video.
| Input | Type | Description | |
|---|---|---|---|
type | string | Optional | public (shared library) or private (your clones) |
language | string | Optional | Language, e.g. English |
gender | string | Optional | male or female |
limit | integer | Optional | Results per page, 1 to 100 (default 20) |
token | string | Optional | next_token from a previous page |
await setu.execute({
userId: "user_1",
action: "heygen.list_voices",
input: {},
});