HeyGen Streaming API

Streaming avatar session lifecycle and task endpoints.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/streaming.task Make an avatar speak text over streaming · Send Task #
Ask an LLM
“How do I get an interactive avatar to speak a script over streaming?”
“Can I send text to an avatar and have it speak it in real time?”
Tell an agent
Send this text to the avatar over streaming: {text}.
Stream the script {text} to the avatar.
POST /v1/streaming.stop End an active streaming session · Close Session #
Ask an LLM
“How do I stop an avatar streaming session?”
“Can I terminate a streaming session by its session ID?”
Tell an agent destructive · confirm first
Close streaming session {session_id}.
Stop the active avatar stream {session_id}.
POST /v1/streaming.start Start an existing streaming session · Start Session #
Ask an LLM
“How do I resume an existing streaming session?”
“Can I open a session I already started?”
Tell an agent
Start streaming session {session_id}.
Resume the existing avatar session {session_id}.
GET /v1/streaming.list List active streaming sessions · List Sessions #
Ask an LLM
“Which streaming sessions are currently active?”
“What avatar sessions are running right now?”
Tell an agent
List my active streaming sessions.
Show every avatar session that is currently streaming.
POST /v1/streaming.new Start a new streaming session with an avatar · New Session #
Ask an LLM
“How do I start a new avatar streaming session?”
“Can I pick an avatar and voice for a fresh streaming session?”
Tell an agent
Start a new streaming session with avatar {avatar_id}.
Start a new avatar session using voice {voice_name}.
POST /v1/streaming.create_token Generate a token for a streaming session · Create Session Token #
Ask an LLM
“How do I get a token to access a streaming session?”
“Can I create a new access token for an avatar session?”
Tell an agent
Create a session token for this streaming session.
Generate a new access token for the avatar session.
POST /v1/streaming.interrupt Stop an avatar from speaking mid-sentence · Interrupt Task #
Ask an LLM
“How do I make an avatar stop speaking immediately?”
“Can I interrupt an avatar's streaming speech?”
Tell an agent destructive · confirm first
Interrupt the avatar's speaking in session {session_id}.
Stop the avatar mid-sentence in session {session_id}.
GET /v1/streaming/avatar.list List interactive avatars for streaming · List Streaming Avatars #
Ask an LLM
“Which interactive avatars can I use for streaming?”
“What avatars are available for avatar sessions?”
Tell an agent
List the interactive avatars available for streaming.
Show every avatar I can start a streaming session with.

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:heygen-streaming-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

heygen-streaming-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: HeyGen Streaming 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: Streaming
  description: Streaming avatar session lifecycle and task endpoints.
paths:
  /v1/streaming.task:
    post:
      summary: Send Task
      description: This endpoint is used to send a text to an Interactive Avatar, prompting it to speak the provided text.
      operationId: send-task
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                RAW_BODY:
                  type: string
                  default: '{"session_id": "<SESSION_ID>","text": "<TEXT>"}'
                  format: json
      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/send-task
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming.stop:
    post:
      summary: Close Session
      description: This endpoint is used to terminate an active streaming session.
      operationId: close-session
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                session_id:
                  type: string
                  description: The ID of the session to be stopped.
                  default: session_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/close-session
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming.start:
    post:
      summary: Start Session
      description: This endpoint is used to start the connection for an existing streaming session.
      operationId: start-session
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                session_id:
                  type: string
                  default: '123456'
      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/start-session
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming.list:
    get:
      summary: List Sessions
      description: This endpoint is used to retrieve a list of currently active streaming sessions.
      operationId: list-sessions
      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-sessions
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming.new:
    post:
      summary: New Session
      description: This endpoint is used to initiate a new streaming session.
      operationId: new-session
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quality:
                  type: string
                  default: medium
                avatar_id:
                  type: string
                  description: ID of the Interactive Avatar you would like to use with the Streaming API
                voice_name:
                  type: string
                  description: voice to use
                voice:
                  type: object
                  properties:
                    voice_id:
                      type: string
                    rate:
                      type: number
                      default: 1
                      format: float
                    emotion:
                      type: string
                knowledge_base:
                  type: string
                  description: Knowledge Base prompt used for chat task type.
                video_encoding:
                  type: string
                  default: VP8
                disable_idle_timeout:
                  type: boolean
                  description: By default session has a 2 minute idle timeout, setting to true disables it
                  default: false
                version:
                  type: string
                  default: 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/new-session
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming.create_token:
    post:
      summary: Create Session Token
      description: This endpoint is used to generate a new access token for a streaming session.
      operationId: create-session-token
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                RAW_BODY:
                  type: string
                  default: '{}'
      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/create-session-token
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming.interrupt:
    post:
      summary: Interrupt Task
      description: This endpoint is used to interrupt the speaking of an Interactive Avatar.
      operationId: interrupt-task
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                session_id:
                  type: string
      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/interrupt-task
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
  /v1/streaming/avatar.list:
    get:
      summary: List Streaming Avatars
      description: This API endpoint allows you to retrieve a list of public and custom interactive avatars.
      operationId: streaming-avatar-list
      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/streaming-avatar-list
      tags:
      - Streaming
      security:
      - ApiKeyAuth: []
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
x-provenance:
  method: harvested
  publisher: HeyGen
  source: https://developers.heygen.com/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)