Skip to content

v0.1.0

Release Date: 2026-07-12

Initial release of the HeyGen Go SDK with Avatar and LiveAvatar API support.

Highlights

  • Initial release of the HeyGen Go SDK with Avatar and LiveAvatar API support

Added

  • Core HTTP client with retry logic and exponential backoff
  • Main SDK entry point with heygen.New() constructor
  • Avatar v3 API client: List, Get, ListLooks
  • LiveAvatar real-time streaming client: NewSession, StartSession, StopSession
  • LITE mode support for BYO AI stack with LiveKit integration
  • Sandbox mode with SandboxAvatarID for testing without credits
  • Typed error handling with APIError, IsUnauthorized, IsRateLimited, IsNotFound
  • Environment variable support for API keys (HEYGEN_API_KEY, LIVEAVATAR_API_KEY)

Documentation

  • README with quick start guide and usage examples
  • MkDocs documentation site with guides and API reference
  • LiveAvatar session example demonstrating full flow

Tests

  • Unit tests for avatar, heygen, and liveavatar packages

Installation

go get github.com/plexusone/heygen-go@v0.1.0

Quick Start

package main

import (
    "context"
    "fmt"
    "log"

    heygen "github.com/plexusone/heygen-go"
    "github.com/plexusone/heygen-go/avatar"
)

func main() {
    client, err := heygen.New("your-api-key")
    if err != nil {
        log.Fatal(err)
    }

    resp, err := client.Avatar.List(context.Background(), &avatar.ListOptions{Limit: 10})
    if err != nil {
        log.Fatal(err)
    }

    for _, a := range resp.Data {
        fmt.Printf("Avatar: %s (%s)\n", a.Name, a.ID)
    }
}