VideoSDK HLS Streaming API

HLS live streaming and playback management.

OpenAPI Specification

videosdk-hls-streaming-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: VideoSDK Real-Time Communication HLS Streaming API
  description: 'REST API for managing rooms, sessions, recordings, RTMP live streams, and HLS streaming for real-time audio and video communication applications. Requires a JWT token signed with your VideoSDK API key and secret, passed in the Authorization header (without a Bearer prefix).

    '
  version: '2.0'
  contact:
    name: VideoSDK Support
    email: support@videosdk.live
    url: https://www.videosdk.live/support
  termsOfService: https://www.videosdk.live/terms
  license:
    name: Proprietary
    url: https://www.videosdk.live/terms
servers:
- url: https://api.videosdk.live/v2
  description: VideoSDK v2 API
security:
- JWTAuth: []
tags:
- name: HLS Streaming
  description: HLS live streaming and playback management.
paths:
  /hls/start:
    post:
      operationId: startHlsStream
      summary: Start HLS Stream
      description: Start an HLS live stream for a meeting session.
      tags:
      - HLS Streaming
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - roomId
              properties:
                roomId:
                  type: string
                  description: The ID of the Room.
                templateUrl:
                  type: string
                  format: uri
                  description: Custom layout template URL.
                transcription:
                  $ref: '#/components/schemas/TranscriptionConfig'
                summary:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                    prompt:
                      type: string
                config:
                  $ref: '#/components/schemas/StreamingConfig'
            example:
              roomId: abc-xyzw-lmno
              config:
                layout:
                  type: GRID
                orientation: landscape
      responses:
        '200':
          description: HLS stream started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HlsStream'
              example:
                sessionId: abcde94c96e17e03fb0abcde4
                start: '2022-04-19T09:18:13.432Z'
                roomId: abcd-efgh-ijkl
                playbackHlsUrl: https://cdn.videosdk.live/meetings-hls/abcdefgh-ijkl-mnop/index.m3u8
                livestreamUrl: https://cdn.videosdk.live/meetings-hls/abcdefgh-ijkl-mnop/live.m3u8
                id: abcdef9879288c1f48339f64
  /hls/stop:
    post:
      operationId: stopHlsStream
      summary: Stop HLS Stream
      description: Stop an active HLS stream.
      tags:
      - HLS Streaming
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - roomId
              properties:
                roomId:
                  type: string
      responses:
        '200':
          description: HLS stream stopped.
  /hls:
    get:
      operationId: fetchHlsStreams
      summary: Fetch All HLS Streams
      description: Retrieve all HLS streams.
      tags:
      - HLS Streaming
      parameters:
      - name: roomId
        in: query
        schema:
          type: string
      - name: page
        in: query
        schema:
          type: integer
          default: 1
      - name: perPage
        in: query
        schema:
          type: integer
          default: 20
      responses:
        '200':
          description: List of HLS streams.
          content:
            application/json:
              schema:
                type: object
                properties:
                  pageInfo:
                    $ref: '#/components/schemas/PageInfo'
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/HlsStream'
  /hls/{hlsId}:
    get:
      operationId: fetchHlsStream
      summary: Fetch Single HLS Stream
      description: Retrieve details of a specific HLS stream.
      tags:
      - HLS Streaming
      parameters:
      - name: hlsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: HLS stream details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HlsStream'
        '404':
          description: HLS stream not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      operationId: deleteHlsStream
      summary: Delete HLS Stream
      description: Delete a specific HLS stream record.
      tags:
      - HLS Streaming
      parameters:
      - name: hlsId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: HLS stream deleted.
  /hls/capture:
    post:
      operationId: fetchHlsThumbnail
      summary: Fetch HLS Thumbnail
      description: Capture a thumbnail snapshot from an active HLS stream.
      tags:
      - HLS Streaming
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - roomId
              properties:
                roomId:
                  type: string
      responses:
        '200':
          description: Thumbnail capture initiated.
components:
  schemas:
    StreamingConfig:
      type: object
      properties:
        layout:
          $ref: '#/components/schemas/LayoutConfig'
        theme:
          type: string
          enum:
          - DARK
          - LIGHT
          - DEFAULT
        mode:
          type: string
          enum:
          - video-and-audio
          - audio
        quality:
          type: string
          enum:
          - low
          - med
          - high
        orientation:
          type: string
          enum:
          - portrait
          - landscape
        recording:
          type: object
          properties:
            enabled:
              type: boolean
    PageInfo:
      type: object
      properties:
        currentPage:
          type: integer
        perPage:
          type: integer
        lastPage:
          type: integer
        total:
          type: integer
    Error:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
    LayoutConfig:
      type: object
      properties:
        type:
          type: string
          enum:
          - GRID
          - SPOTLIGHT
          - SIDEBAR
          description: Layout type.
        priority:
          type: string
          enum:
          - SPEAKER
          - PIN
          description: Layout priority.
        gridSize:
          type: integer
          description: Number of participants in grid (max 25).
          maximum: 25
    HlsStream:
      type: object
      properties:
        id:
          type: string
          description: HLS stream identifier.
        sessionId:
          type: string
        roomId:
          type: string
        start:
          type: string
          format: date-time
        playbackHlsUrl:
          type: string
          format: uri
          description: Live HLS URL with playback support.
        livestreamUrl:
          type: string
          format: uri
          description: Live HLS URL without playback support.
        downstreamUrl:
          type: string
          format: uri
          description: Deprecated playback URL.
        links:
          type: object
          properties:
            get_room:
              type: string
              format: uri
            get_session:
              type: string
              format: uri
    TranscriptionConfig:
      type: object
      properties:
        enabled:
          type: boolean
          description: Enable transcription.
        summary:
          type: object
          properties:
            enabled:
              type: boolean
            prompt:
              type: string
              description: Custom prompt for AI summary generation.
  securitySchemes:
    JWTAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'JWT token generated using your VideoSDK API key and secret (HS256). Pass the token directly without a "Bearer" prefix.

        '
externalDocs:
  description: VideoSDK API Reference
  url: https://docs.videosdk.live/api-reference/realtime-communication/intro