HeyGen icon

HeyGen

Consume HeyGen API

Overview

The "Train Avatar Group" operation in the Photo Avatar resource allows users to initiate a training process for a specific avatar group using the HeyGen API. This operation is useful when you have created or updated an avatar group with new looks or images and want to train the system to recognize and optimize that group's avatars for further use, such as generating new looks or animations.

Typical scenarios include:

  • After adding new looks or images to an avatar group, you train the group so the AI model can learn from the new data.
  • Preparing an avatar group for advanced operations like generating avatar looks or motions based on trained data.

Example: You have an avatar group representing a character with multiple facial expressions (looks). After adding several new looks, you run the "Train Avatar Group" operation to enable the system to generate new avatar variations or animations based on the trained group.

Properties

Name Meaning
Group ID The unique identifier of the avatar group to be trained. This is required to specify which avatar group the training should be applied to.

Output

The output JSON contains the response from the HeyGen API after initiating the training job for the specified avatar group. Typically, this will include information about the training job status or confirmation that the training has started.

The node does not output binary data for this operation.

Dependencies

  • Requires an active connection to the HeyGen API via an API key credential configured in n8n.
  • The HeyGen API endpoint /photo_avatar/train is called with a POST request including the group_id.
  • No additional environment variables are explicitly required beyond the API authentication setup.

Troubleshooting

  • Common issue: Providing an invalid or non-existent Group ID will likely cause the API to return an error indicating the group was not found. Ensure the Group ID is correct and corresponds to an existing avatar group.
  • Error message: If the node throws an error related to missing parameters, verify that the Group ID property is set and not empty.
  • API errors: Network issues or invalid API credentials may cause failures. Confirm that the HeyGen API key is valid and the service is reachable.
  • Training delays: Training might take some time; use the "Get Training Status" operation to monitor progress.

Links and References

  • HeyGen API Documentation (general reference for API endpoints)
  • HeyGen Photo Avatar API section (for details on avatar group training and management)

This summary focuses exclusively on the "Train Avatar Group" operation within the "Photo Avatar" resource as requested.

Discussion