Heygen | By Mentor AI

Interact with Heygen API

Overview

This node interacts with the Heygen API to perform various operations including uploading assets such as images, videos, or audio files. Specifically, the 'Upload Asset' operation allows users to upload a file either from binary data within the workflow or from a publicly accessible URL. This is useful for scenarios where users need to programmatically upload media files to Heygen for further processing or use, such as generating avatar videos or managing media assets.

Use Case Examples

  1. Uploading an image file from a binary property in the workflow to Heygen.
  2. Uploading a video file from a public URL to Heygen.

Properties

Name Meaning
Upload Mode Determines whether the file to upload is sourced from binary data within the workflow or from a public URL.
Binary Property The name of the binary property containing the file data to upload. Required if 'Upload Mode' is set to 'Binary Data'.
File URL The publicly accessible URL of the file to upload. Required if 'Upload Mode' is set to 'File URL'.
Content Type The MIME type of the file being uploaded, such as image/jpeg or video/mp4.

Output

JSON

  • id - The unique identifier of the uploaded asset returned by Heygen.
  • url - The URL where the uploaded asset can be accessed.
  • type - The type of the uploaded asset (e.g., image, video, audio).
  • status - The status of the upload operation.

Dependencies

  • Heygen API key credential required for authentication.

Troubleshooting

  • If the upload fails, ensure the API key credential is correctly configured and has the necessary permissions.
  • For 'Binary Data' upload mode, verify that the specified binary property exists and contains valid data.
  • For 'File URL' upload mode, ensure the URL is publicly accessible and the file is reachable.
  • Content type mismatches can cause upload errors; ensure the MIME type matches the file being uploaded.

Links

Discussion