HeyGen

Create AI-generated videos with virtual avatars using HeyGen.

AI and MLAPI key10 actionsAll integrations

On this page
  1. Connect
  2. Call it from a workflow
  3. Actions (10)
  4. list_avatars
  5. create-video-from-template
  6. custom_api_call
  7. list_videos
  8. list_voices
  9. retrieve_sharable_video_url
  10. retrieve_video_status
  11. retrieve-translated-video-status
  12. translate_video
  13. upload_asset
  14. Details

Connect

Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.

  • From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
  • Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
  • Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.

Call it from a workflow

step.ctx.integrations.invoke("heygen", action, input) resolves with the provider's answer and rejects when HeyGen isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "heygen"} says whether yours can call it.

Workflow
// workflows/notify.ts: call HeyGen when a booking is confirmed
import { on } from "@appbricx/workflows";

export const tellHeygen = on.transition("booking", "status", "confirmed", async (_event, step) => {
  // Recorded once: a retry doesn't send it twice. Rejects when HeyGen isn't connected.
  const output = await step.run("HeyGen", () =>
    step.ctx.integrations.invoke("heygen", "create-video-from-template", {
      "templateId": "<templateId>",
      "title": "<video title>"
    }),
  );
  step.ctx.log("HeyGen answered", output);
});
Try it from your agent
{
  "name": "integrations",
  "arguments": {
    "project_id": "<project-id>",
    "action": "call",
    "piece": "heygen",
    "piece_action": "create-video-from-template",
    "input": {
      "templateId": "<templateId>",
      "title": "<video title>"
    },
    "env": "dev"
  }
}
From another backend (connector proxy)
curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/heygen/create-video-from-template" \
  -H "Authorization: Bearer $APP_KEY" \
  -H "content-type: application/json" \
  -d '{"props":{"templateId":"<templateId>","title":"<video title>"}}'

Actions

list_avatars

List Avatars. Retrieve a list of all available avatars.

No input.

create-video-from-template

Create Video from Template. Create a video using a selected template.

InputTypeDescription
templateIdrequiredid (picked from your account)Select the template to generate the video.
titlerequiredtextTitle of the generated video.
captionoptionalbooleanEnable Captions
includeGifoptionalbooleanInclude GIF Preview
enableSharingoptionalbooleanEnable Public Sharing
folderIdoptionalid (picked from your account)Select the folder to store the video.
brandVoiceIdoptionalid (picked from your account)Select the Brand Voice to apply to the video.
callbackUrloptionaltextWebhook URL to notify when video rendering is complete.
dimensionWidthoptionalnumberVideo Width
dimensionHeightoptionalnumberVideo Height
variablesoptionalobject (depends on other props)Template Varriables

custom_api_call

Custom API Call. Make a custom API call to a specific endpoint

InputTypeDescription
urlrequiredobject (depends on other props)url
methodrequiredone of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD"Method
headersrequiredobjectAuthorization headers are injected automatically from your connection.
queryParamsrequiredobjectQuery Parameters
body_typeoptionalone of "none" | "json" | "form_data" | "raw"Body Type
bodyoptionalobject (depends on other props)Body
response_is_binaryoptionalbooleanEnable for files like PDFs, images, etc.
failsafeoptionalbooleanNo Error on Failure
timeoutoptionalnumberTimeout (in seconds)
followRedirectsoptionalbooleanFollow redirects

list_videos

List Videos. Retrieve a list of all generated videos.

InputTypeDescription
limitoptionalnumberMaximum number of videos to retrieve (max 100).

list_voices

List Voices. Retrieve a list of all available voices.

No input.

retrieve_sharable_video_url

Retrieve Sharable Video URL. Generates a public URL for a video, allowing it to be shared and accessed publicly.

InputTypeDescription
videoIdrequiredtextThe ID of the video to generate a shareable URL for.

retrieve_video_status

Retrieve Video Status. Retrieve the status and details of a video using its ID.

InputTypeDescription
videoIdrequiredtextThe ID of the video to retrieve the status for.

retrieve-translated-video-status

Retrieve Translated Video Status. Retrieves the status of a translated video.

InputTypeDescription
videoIdrequiredtextThe ID of the translated video to check the status for.

translate_video

Translate Video. Translate a video into 175+ languages with natural voice and lip-sync.

InputTypeDescription
videoUrlrequiredtextURL of the video file to be translated. Supports direct URLs, Google Drive, and YouTube.
titleoptionaltextOptional title of the translated video.
outputLanguagerequiredid (picked from your account)Select the language for video translation.
translateAudioOnlyoptionalbooleanOnly translate the audio without modifying faces.
speakerNumoptionalnumberNumber of speakers in the video (if applicable).
brandVoiceIdoptionalid (picked from your account)Select the Brand Voice to apply to the video.
callbackIdoptionaltextCustom ID returned in webhook callback.
callbackUrloptionaltextURL to notify when translation is complete.

upload_asset

Upload an Asset. Upload media files (images, videos, or audio) to HeyGen. Supports JPEG, PNG, MP4, WEBM, and MPEG files.

InputTypeDescription
filerequiredfileThe file to upload (JPEG, PNG, MP4, WEBM, or MPEG).

Details

Id
heygen
Category
AI and ML
Tags
video, avatar, generation, ai, presentation
Package
@activepieces/piece-heygen@0.1.5
Runs
Through the integration runner