> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# [HG1] Generate Avatar Video

> Generates a talking-photo avatar video via HeyGen. Scrapes a blog URL or uses a topic/script to create a voiceover, then submits to HeyGen V2 API. Returns a video_id for status polling.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/heygen_avatar_generate_video
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/heygen_avatar_generate_video:
    post:
      tags:
        - HeyGen Avatar
      summary: '[HG1] Generate Avatar Video'
      description: >-
        Generates a talking-photo avatar video via HeyGen. Scrapes a blog URL or
        uses a topic/script to create a voiceover, then submits to HeyGen V2
        API. Returns a video_id for status polling.
      operationId: heygenAvatarGenerateVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                source_type:
                  type: string
                  enum:
                    - blog_url
                    - topic_or_script
                  description: How to generate the video script.
                  default: blog_url
                blog_url:
                  type: string
                  description: >-
                    URL of blog post to scrape (required when source_type is
                    blog_url).
                topic:
                  type: string
                  x-ui: textarea
                  description: >-
                    Topic idea or full script text (required when source_type is
                    topic_or_script).
                content_type:
                  type: string
                  enum:
                    - blog_summary
                    - blog_promotion
                  description: Video style when using blog URL source.
                  default: blog_summary
                aspect_ratio:
                  type: string
                  enum:
                    - landscape
                    - portrait
                  default: landscape
                avatar_name:
                  type: string
                  enum:
                    - sawyer
                    - gabrielle
                    - denyse
                    - kaitlyn
                    - asher
                    - chukwu
                    - araj
                    - declan
                    - nevaeh
                    - youssef
                  default: sawyer
                expression:
                  type: string
                  enum:
                    - default
                    - happy
                  default: default
                circle_style:
                  type: boolean
                  description: Apply circle mask to avatar.
                  default: false
                background_color:
                  type: string
                  description: 'Hex color for video background (e.g. #FFFFFF).'
                  default: '#FFFFFF'
                output_variable_name:
                  type: string
                  description: >-
                    Variable name for result. Access fields with
                    {{heygen_result.video_id}}, {{heygen_result.title}},
                    {{heygen_result.script}}.
                  default: heygen_result
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - source_type
                - aspect_ratio
                - avatar_name
                - output_variable_name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````