# HeyGen Integration via LowCodeAPI

## Overview

HeyGen API provides AI video generation capabilities. Create engaging videos with AI avatars, text-to-speech, and custom scripts.

## Base Endpoint

```
https://api.lowcodeapi.com/heygen/
```

## Authentication

LowCodeAPI handles authentication automatically using API key credentials.

**Auth Type**: API Key

## Common Endpoints

### Category: Videos

#### Generate Video

**Method**: `POST` | **LowCodeAPI Path**: `/v1/video/generate`

**Full URL**:
```
https://api.lowcodeapi.com/heygen/v1/video/generate?api_token={api_token}
```

**Description**: Generate a video from script

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `api_token` | string | Yes | Your LowCodeAPI authentication token |

**Body Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `script_text` | string | Yes | Script for the video |
| `avatar_id` | string | Yes | Avatar to use |
| `voice_id` | string | Yes | Voice for the avatar |

**Example Request**:
```bash
curl -X POST "https://api.lowcodeapi.com/heygen/v1/video/generate?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "script_text": "Welcome to our product demo",
    "avatar_id": "avatar-id",
    "voice_id": "voice-id"
  }'
```

---

## Usage Examples

### Example 1: Create Video

```bash
# Generate a new video
# No ID required - creates new video
curl -X POST "https://api.lowcodeapi.com/heygen/v1/video/generate?api_token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "script_text": "This is an AI-generated video",
    "avatar_id": "YOUR_AVATAR_ID",
    "voice_id": "YOUR_VOICE_ID"
  }'
```

## Complete Endpoint Reference

- **Official Documentation**: [https://www.heygen.com/api-docs](https://www.heygen.com/api-docs)