HeyGen Templates API

Template listing, retrieval, and template-based video generation.

Operations 4

POST /v2/template/{template_id}/generate Generate Video from Template #
GET /v2/template/{template_id} Retrieve Template Details #
GET /v2/templates List Templates #
GET /v3/template/{template_id} Retrieve Template Details (V3) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/heygen-templates-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

heygen-templates-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HeyGen Account Templates API
  version: 4.0.8
  description: OpenAPI specification for the HeyGen API endpoints referenced across the documentation.
servers:
- url: https://api.heygen.com
security:
- ApiKeyAuth: []
tags:
- name: Templates
  description: Template listing, retrieval, and template-based video generation.
paths:
  /v2/template/{template_id}/generate:
    post:
      summary: Generate Video from Template
      description: This API now supports New AI Studio!
      operationId: generate-from-template-v2
      parameters:
      - name: template_id
        in: path
        schema:
          type: string
        required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                caption:
                  type: boolean
                  default: false
                callback_id:
                  type: string
                  default: <callback_id>
                title:
                  type: string
                  default: Untitled Video
                variables:
                  type: object
                  description: variables
                  properties: {}
                dimension:
                  type: object
                  description: (Optional)The dimension of the output video, you can use this to set the output video to be a different one from template, though the aspect ratio should be the same
                  properties:
                    width:
                      type: integer
                      default: 1280
                      format: int32
                    height:
                      type: integer
                      default: 720
                      format: int32
                include_gif:
                  type: boolean
                  description: include a GIF preview download URL in the webhook response
                  default: false
                enable_sharing:
                  type: boolean
                  description: make the sharing page of this video public upon creation
                  default: false
                folder_id:
                  type: string
                  description: enable users to specify video folder destination
                brand_voice_id:
                  type: string
                  description: Brand Voice ID
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-mint:
        href: /reference/generate-from-template-v2
      tags:
      - Templates
      security:
      - ApiKeyAuth: []
  /v2/template/{template_id}:
    get:
      summary: Retrieve Template Details
      description: This API now supports New AI Studio!
      operationId: get-template-v2
      parameters:
      - name: template_id
        in: path
        schema:
          type: string
        required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-mint:
        href: /reference/get-template-v2
      tags:
      - Templates
      security:
      - ApiKeyAuth: []
  /v2/templates:
    get:
      summary: List Templates
      description: This API now supports New AI Studio!
      operationId: list-templates-v2
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-mint:
        href: /reference/list-templates-v2
      tags:
      - Templates
      security:
      - ApiKeyAuth: []
  /v3/template/{template_id}:
    get:
      summary: Retrieve Template Details (V3)
      description: Retrieves template details by ID, including variables available for replacement and scene mappings for the New AI Studio.
      operationId: get-template-v3
      tags:
      - Templates
      security:
      - ApiKeyAuth: []
      parameters:
      - name: template_id
        in: path
        required: true
        schema:
          type: string
        description: Unique identifier of the template.
      responses:
        '200':
          description: Template details retrieved successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type:
                    - string
                    - 'null'
                  data:
                    type: object
                    properties:
                      version:
                        type: string
                      variables:
                        type: object
                      scenes:
                        type:
                        - array
                        - 'null'
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            script:
                              type: string
                            variables:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                  type:
                                    type: string
      x-mint:
        href: /reference/get-template-v3
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: x-api-key
      x-default: <your-api-key>
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY