# Heygen AI Integration via LowCodeAPI

**Last Updated**: February 10, 2026

## Overview
AI video generation platform for creating talking avatars and video content

**Categories:**
- {'id': 'video-generation', 'name': 'Video Generation AI'}

## Base Endpoint
https://api.lowcodeapi.com/heygen

**Important**: Always include the provider name in the URL path after `api.lowcodeapi.com/`

## Authentication
**Type:** TOKEN

**Official Documentation:** https://docs.heygen.com/reference/authentication

## URL Format (Important)

LowCodeAPI supports two URL formats. **Always try the New Format first**, then fall back to Old Format if needed.

### New Format (Priority)
- Path parameters stay in the URL path
- Do NOT include path parameters as query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/{id}?api_token=XXX`

### Old Format (Fallback)
- Path parameters become query parameters
- Example: `https://api.lowcodeapi.com/{provider}/resource/id?id={id}&api_token=XXX`

### Decision Flow for AI Agents
1. Always use **New Format** first - keep path parameters in the URL path
2. If you get a 404 or error, try **Old Format** with sanitized path
3. Log which format worked for future requests to this provider

## API Categories

## Common Endpoints

### List All Avatars

**Method:** GET
**LowCodeAPI Path:** /v2/avatars

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/avatars?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/avatars?api_token=YOUR_API_TOKEN

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/avatars?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/list-avatars-v2

### List All Voices

**Method:** GET
**LowCodeAPI Path:** /v2/voices

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/voices?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/voices?api_token=YOUR_API_TOKEN

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/voices?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/list-voices-v2

### List All Avatar Groups

**Method:** GET
**LowCodeAPI Path:** /v2/avatar_group.list

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/avatar_group.list?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/avatar_group.list?api_token=YOUR_API_TOKEN

**Query Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| include_public | boolean |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/avatar_group.list?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/list-all-avatar-groups

### Photo avatar details

**Method:** GET
**LowCodeAPI Path:** /v2/photo_avatar/{id}

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/photo_avatar/{id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/photo_avatar/id?id={id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/photo_avatar/{id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/photo-avatar-details

### List All Avatars in one avatar group

**Method:** GET
**LowCodeAPI Path:** /v2/avatar_group/{group_id}/avatars

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/avatar_group/{group_id}/avatars?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/avatar_group/group_id/avatars?group_id={group_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| group_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/avatar_group/{group_id}/avatars?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/list-all-avatars-in-one-avatar-group

### List Sessions

**Method:** GET
**LowCodeAPI Path:** /v1/streaming.list

**New Format URL:**
https://api.lowcodeapi.com/heygen/v1/streaming.list?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v1/streaming.list?api_token=YOUR_API_TOKEN

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v1/streaming.list?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/list-sessions

### Check photo/look generation status

**Method:** GET
**LowCodeAPI Path:** /v2/photo_avatar/generation/{generation_id}

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/photo_avatar/generation/{generation_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/photo_avatar/generation/generation_id?generation_id={generation_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| generation_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/photo_avatar/generation/{generation_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/check-photolook-generation-status

### Create Session Token

**Method:** POST
**LowCodeAPI Path:** /v1/streaming.create_token

**New Format URL:**
https://api.lowcodeapi.com/heygen/v1/streaming.create_token?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v1/streaming.create_token?api_token=YOUR_API_TOKEN

**Request Body:**

| Field | Type | Description |
|-------|------|-------------|
| raw_body | string |  |

**Example Request (New Format):**

```bash
curl -X POST 'https://api.lowcodeapi.com/heygen/v1/streaming.create_token?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/create-session-token

### Get training job status

**Method:** GET
**LowCodeAPI Path:** /v2/photo_avatar/train/status/{group_id}

**New Format URL:**
https://api.lowcodeapi.com/heygen/v2/photo_avatar/train/status/{group_id}?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v2/photo_avatar/train/status/group_id?group_id={group_id}&api_token=YOUR_API_TOKEN

**Path Parameters:**

| Parameter | Type | Description |
|-----------|------|-------------|
| group_id | string |  |

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v2/photo_avatar/train/status/{group_id}?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/get-training-job-status

### List Streaming Avatars

**Method:** GET
**LowCodeAPI Path:** /v1/streaming/avatar.list

**New Format URL:**
https://api.lowcodeapi.com/heygen/v1/streaming/avatar.list?api_token=YOUR_API_TOKEN

**Old Format URL:**
https://api.lowcodeapi.com/heygen/v1/streaming/avatar.list?api_token=YOUR_API_TOKEN

**Example Request (New Format):**

```bash
curl -X GET 'https://api.lowcodeapi.com/heygen/v1/streaming/avatar.list?api_token=YOUR_API_TOKEN'
```

**Official Documentation:** https://docs.heygen.com/reference/streaming-avatar-list


## Usage Examples

### Example 1: Basic Chat Completion

Creating a simple text completion or chat message:

```bash
# Create a chat completion - no path parameters needed
curl -X POST "https://api.lowcodeapi.com/heygen/v1/chat/completions?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-name",
    "messages": [
      {"role": "user", "content": "Hello, how can you help me?"}
    ]
  }'

# Response includes generated content
```

### Example 2: Text Generation with Path Parameters

Generating text with specific model settings:

```bash
# Generate content using a specific model
curl -X POST "https://api.lowcodeapi.com/heygen/v1/models/generate?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a short poem about technology",
    "max_tokens": 100
  }'

# Or if the provider uses model in the path:
curl -X POST "https://api.lowcodeapi.com/heygen/v1/models/{MODEL_ID}:generateContent?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [{"parts": [{"text": "Write a short story"}]}]
  }'
```

### Example 3: List Available Models

```bash
# Get list of available models
curl -X GET "https://api.lowcodeapi.com/heygen/v1/models?api_token=YOUR_API_TOKEN"
```

## Error Handling

LowCodeAPI returns standard HTTP status codes. Common errors:

| Status Code | Description |
|-------------|-------------|
| 200 | Success - Request completed successfully |
| 400 | Bad Request - Invalid parameters or request body |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Endpoint or resource doesn't exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Provider API error |

All error responses include error details:

```json
{
  "data": {
    "error": {
      "message": "Error description",
      "code": "ERROR_CODE"
    }
  }
}
```

## Complete Endpoint Reference

| Endpoint | Method | Category |
|----------|--------|----------|
| List All Avatars | GET | Avatars and Voices |
| List All Voices | GET | Avatars and Voices |
| List All Avatar Groups | GET | Avatars and Voices |
| Photo avatar details | GET | Photo  Avatars |
| List All Avatars in one avatar group | GET | Avatars and Voices |
| List Sessions | GET | Streaming API |
| Check photo/look generation status | GET | Photo  Avatars |
| Create Session Token | POST | Streaming API |
| Get training job status | GET | Photo  Avatars |
| List Streaming Avatars | GET | Streaming API |
| List Brand Voices | GET | Brand |
| List Templates | GET | Templates |
| Retrieve Template Details | GET | Templates |
| Get Remaining Quota | GET | User |
| Retrieve Video Details | GET | Video Generation |
| List Available Webhook Events | GET | Webhook |
| Delete a Video | DELETE | Video Generation |
| Retrieve Video List | GET | Video Management |
| Get Current User Information | GET | User |
| Check Translation Status | GET | Video Translation |
| List Webhook Endpoints | GET | Webhook |
| Create Avatar Video (V2) | POST | Video Generation |
| Create a WebM Video | POST | Video Generation |
| Generate photo avatar photos | POST | Photo  Avatars |
| Generate Video from Template | POST | Templates |
| List Supported Languages | GET | Video Translation |
| Translate Video | POST | Video Translation |
| New Session | POST | Streaming API |
| Start Session | POST | Streaming API |
| Send Task | POST | Streaming API |
| Close Session | POST | Streaming API |
| Interrupt Task | POST | Streaming API |
| Create photo avatar group | POST | Photo  Avatars |
| Add looks to photo avatar group | POST | Photo  Avatars |
| Train photo avatar group | POST | Photo  Avatars |
| Generate photo avatar looks | POST | Photo  Avatars |
| Add motion | POST | Photo  Avatars |
| Add sound effect | POST | Photo  Avatars |
| Upscale an avatar | POST | Photo  Avatars |
| Upload Asset | POST | Assets |
| Add a Webhook Endpoint | POST | Webhook |
| Update a Webhook Endpoint | PATCH | Webhook |
| Delete a Webhook Endpoint | DELETE | Webhook |
| List Folders | GET | Folders |
| Create Folder | POST | Folders |
| Update Folder (Rename Only) | POST | Folders |
| Trash Folder | POST | Folders |
| Restore Folder | POST | Folders |

## API Definition Endpoints

You can fetch the complete API specification for this provider:

**New Format (OpenAPI spec):**
```bash
curl 'https://backend.lowcodeapi.com/heygen/openapi'
```

**Old Format (API definition):**
```bash
curl 'https://backend.lowcodeapi.com/heygen/definition'
```

## Response Format

All responses are wrapped in a `data` key:

```json
{
  "data": {
    // Actual response from provider (object or array)
  }
}
```