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

# HeyGen Video Agent

> - HeyGen Video Agent: an intelligent video agent that automatically generates digital avatar videos from just a prompt
 - Optionally specify avatar, voice, style, and orientation; video duration is automatically determined by the Agent
- Asynchronous processing mode — use the returned task ID to [check task status](/pages/en/api-manual/task-management/get-task-detail)
- Generated video links are valid for 24 hours; please save them promptly




## OpenAPI

````yaml openapi/en/heygen-video-agent.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: HeyGen Video Agent
  version: '1.0'
servers:
  - url: https://api.aihubmax.com
security:
  - BearerAuth: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - Video > HeyGen
      summary: HeyGen Video Agent
      description: >
        - HeyGen Video Agent: an intelligent video agent that automatically
        generates digital avatar videos from just a prompt
         - Optionally specify avatar, voice, style, and orientation; video duration is automatically determined by the Agent
        - Asynchronous processing mode — use the returned task ID to [check task
        status](/pages/en/api-manual/task-management/get-task-detail)

        - Generated video links are valid for 24 hours; please save them
        promptly
      operationId: heygen-video-agent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeygenVideoAgentRequest'
            examples:
              minimal_only_prompt:
                summary: >-
                  Minimal: only prompt, avatar / voice auto-selected by the
                  model
                value:
                  model: heygen-video-agent
                  prompt: >-
                    A weather reporter in front of a sunny city skyline
                    introducing today's forecast in an upbeat tone.
              specify_avatar_voice_portrait:
                summary: Specify avatar / voice / portrait orientation
                value:
                  model: heygen-video-agent
                  prompt: >-
                    Explain quantum computing to a curious teenager in 30
                    seconds.
                  avatar_id: Anna_public_3_20240108
                  voice_id: en-US-Studio-O
                  orientation: portrait
              with_reference_and_incognito:
                summary: With reference materials and incognito mode
                value:
                  model: heygen-video-agent
                  prompt: >-
                    Create a product walkthrough based on the attached
                    screenshots.
                  file_urls:
                    - https://example.com/screenshot-1.png
                    - https://example.com/screenshot-2.png
                  incognito_mode: true
      responses:
        '200':
          $ref: '#/components/responses/TaskCreated'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  schemas:
    HeygenVideoAgentRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          description: >-
            `heygen-video-agent`: intelligent video agent that automatically
            generates digital avatar videos
          examples:
            - heygen-video-agent
          type: string
          default: heygen-video-agent
        prompt:
          description: >
            Natural language prompt describing the desired video content


            **Notes:**

            - Maximum 10,000 characters

            - Video Agent autonomously decides casting, scripting, scene
            arrangement, and editing

            - Output video duration is determined by the model; clients cannot
            specify it
          maxLength: 10000
          type: string
          example: >-
            A weather reporter in front of a sunny city skyline introducing
            today's forecast.
        avatar_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >
            HeyGen avatar identifier to use


            **Notes:**

            - Omit or leave empty → Video Agent auto-selects

            - You can pass a HeyGen official avatar ID, or `auto` to let the
            model decide
          example: Anna_public_3_20240108
        voice_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >
            HeyGen voice identifier to use


            **Notes:**

            - Omit or leave empty → Video Agent auto-selects

            - You can pass a HeyGen official voice ID, or `auto` to let the
            model decide
          example: en-US-Studio-O
        style_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: |
            HeyGen visual style template ID

            **Notes:**
            - Controls scene composition, pacing, and aesthetics
            - Omit to use the default style
          example: modern_vlog_01
        orientation:
          anyOf:
            - enum:
                - landscape
                - portrait
              type: string
            - type: 'null'
          default: null
          description: |
            Output video orientation

            **Options:**
            - `landscape` — horizontal
            - `portrait` — vertical
            - Omit → Video Agent decides automatically
          example: landscape
        file_urls:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          default: null
          description: |-
            List of reference material URLs (images / videos / audio / PDFs)

            **Notes:**
            - Up to 20 URLs


            > Do not pass this parameter unless necessary.
          x-advanced: true
          example:
            - https://example.com/screenshot-1.png
        incognito_mode:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: |-
            Whether to enable incognito mode (disable agent memory)

            > Do not pass this parameter unless necessary.
          x-advanced: true
          example: true
    TaskResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757165031
        id:
          type: string
          description: Task ID
          example: task-unified-1757165031-uyujaw3d
        model:
          type: string
          description: Model name actually used
        object:
          type: string
          description: Specific type of the task
          enum:
            - video.generation.task
        progress:
          type: integer
          description: Task progress percentage (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          type: object
          description: Async task information
          properties:
            can_cancel:
              type: boolean
              description: Whether the task can be cancelled
              example: true
            estimated_time:
              type: integer
              description: Estimated completion time (seconds)
              example: 45
        type:
          type: string
          description: Output type of the task
          enum:
            - video
          example: video
    ErrorResponse400:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Bad request format
            type:
              type: string
              example: invalid_request_error
    ErrorResponse401:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Invalid API key
            type:
              type: string
              example: authentication_error
    ErrorResponse402:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Insufficient account balance
            type:
              type: string
              example: insufficient_quota
    ErrorResponse422:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Parameter validation failed
            type:
              type: string
              example: validation_error
    ErrorResponse429:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Rate limit exceeded
            type:
              type: string
              example: rate_limit_error
    ErrorResponse500:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Internal server error
            type:
              type: string
              example: server_error
    ErrorResponse503:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              example: Service temporarily unavailable, please try again later
            type:
              type: string
              example: service_unavailable
  responses:
    TaskCreated:
      description: Task created successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TaskResponse'
    BadRequest:
      description: Bad request format
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse400'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse401'
    PaymentRequired:
      description: Insufficient balance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse402'
    UnprocessableEntity:
      description: Parameter validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse422'
    TooManyRequests:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse429'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse500'
    ServiceUnavailable:
      description: Service temporarily unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse503'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        ## All endpoints require Bearer Token authentication ##

        Add the following header to your request:

        `Authorization: Bearer YOUR_API_KEY`

````