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

# Create playlist

> Playlist is a curated collection of video content organized in a sequential manner. 


This method offers several advantages and features that are typical of live streaming but with more control over the content. Here's how it works:
- Playlist always consists only of static VOD videos you previously uploaded to the system.
- Playlist is always played as a "Live stream" for end-users, so without the ability to fast forward the stream to the “future”. Manifest will contain chunks as for live stream too.
- Playlist can be looped endlessly. In this case, all the videos in the list will be constantly repeated through the list.
- Playlist can be programmed to be played at a specific time in the future. In that case, before the start time there will be empty manifest.


You can add new videos to the list, remove unnecessary videos, or change the order of videos in the list.
But please pay attention to when the video list changes, it is updated instantly on the server. This means that after saving the changed list, the playlist will be reloaded for all users and it will start plays from the very first element.

Maximum video limit = 128 videos in a row. 

  


Examples of usage:
- Looped video playback
- Scheduled playback

**Looped video playback**

It can be used to simulate TV channel pre-programmed behaviour.

- Selection: Choose a series of videos, such as TV show episodes, movies, tutorials, or any other relevant content.
- Order: Arrange the selected videos in the desired sequence, much like setting a broadcast schedule.
- Looping: Optionally, the playlist can be set to loop, replaying the sequence once it finishes to maintain a continuous stream.

Example:

```
  active: true
  loop: true
  name: "Playlist: TV channel 'The world around us' (Programmed broadcast for 24 hours)"
```


**Scheduled playback**

It can be used to simulate live events such as virtual concerts, webinars, or any special broadcasts without the logistical challenges of an actual live stream.

- Timing: Set specific start time, creating the illusion of a live broadcast schedule.
- Selection: Choose a video or series of videos to be played at the specified time.
- No Pauses: Unlike on-demand streaming where users can pause and skip, this emulated live stream runs continuously, mirroring the constraints of traditional live broadcasts.

```
  active: true
  loop: false
  name: "Playlist: Webinar 'Onboarding for new employees on working with the corporate portal'"
  start_time: "2024-07-01T11:00:00Z"
```



## OpenAPI

````yaml /api-reference/services_documented/streaming_api.yaml post /streaming/playlists
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Streaming API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-07T20:33:46.548242+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: AI
    x-displayName: AI
  - name: Broadcasts
    x-displayName: Broadcasts
  - name: Directories
    x-displayName: Directories
  - name: Overlays
    x-displayName: Overlays
  - name: Players
    x-displayName: Players
  - name: Playlists
    x-displayName: Playlists
  - name: QualitySets
    x-displayName: QualitySets
  - name: Restreams
    x-displayName: Restreams
  - name: Streaming Statistics
    x-displayName: Statistics
  - name: Streams
    x-displayName: Streams
  - name: Subtitles
    x-displayName: Subtitles
  - name: Videos
    x-displayName: Videos
paths:
  /streaming/playlists:
    post:
      tags:
        - Playlists
      summary: Create playlist
      description: >-
        Playlist is a curated collection of video content organized in a
        sequential manner. 



        This method offers several advantages and features that are typical of
        live streaming but with more control over the content. Here's how it
        works:

        - Playlist always consists only of static VOD videos you previously
        uploaded to the system.

        - Playlist is always played as a "Live stream" for end-users, so without
        the ability to fast forward the stream to the “future”. Manifest will
        contain chunks as for live stream too.

        - Playlist can be looped endlessly. In this case, all the videos in the
        list will be constantly repeated through the list.

        - Playlist can be programmed to be played at a specific time in the
        future. In that case, before the start time there will be empty
        manifest.



        You can add new videos to the list, remove unnecessary videos, or change
        the order of videos in the list.

        But please pay attention to when the video list changes, it is updated
        instantly on the server. This means that after saving the changed list,
        the playlist will be reloaded for all users and it will start plays from
        the very first element.


        Maximum video limit = 128 videos in a row. 

          


        Examples of usage:

        - Looped video playback

        - Scheduled playback


        **Looped video playback**


        It can be used to simulate TV channel pre-programmed behaviour.


        - Selection: Choose a series of videos, such as TV show episodes,
        movies, tutorials, or any other relevant content.

        - Order: Arrange the selected videos in the desired sequence, much like
        setting a broadcast schedule.

        - Looping: Optionally, the playlist can be set to loop, replaying the
        sequence once it finishes to maintain a continuous stream.


        Example:


        ```
          active: true
          loop: true
          name: "Playlist: TV channel 'The world around us' (Programmed broadcast for 24 hours)"
        ```



        **Scheduled playback**


        It can be used to simulate live events such as virtual concerts,
        webinars, or any special broadcasts without the logistical challenges of
        an actual live stream.


        - Timing: Set specific start time, creating the illusion of a live
        broadcast schedule.

        - Selection: Choose a video or series of videos to be played at the
        specified time.

        - No Pauses: Unlike on-demand streaming where users can pause and skip,
        this emulated live stream runs continuously, mirroring the constraints
        of traditional live broadcasts.


        ```
          active: true
          loop: false
          name: "Playlist: Webinar 'Onboarding for new employees on working with the corporate portal'"
          start_time: "2024-07-01T11:00:00Z"
        ```
      operationId: post_playlists
      parameters: []
      requestBody:
        $ref: '#/components/requestBodies/playlist'
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/playlist_post'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            playlist_created = client.streaming.playlists.create()
            print(playlist_created)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/option\"\n\t\"github.com/G-Core/gcore-go/streaming\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tplaylistCreated, err := client.Streaming.Playlists.New(context.TODO(), streaming.PlaylistNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", playlistCreated)\n}\n"
components:
  requestBodies:
    playlist:
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/playlist'
  schemas:
    playlist_post:
      allOf:
        - $ref: '#/components/schemas/playlist'
      properties:
        id:
          type: integer
          description: Playlist ID
      example:
        id: 6018
    playlist:
      type: object
      properties:
        name:
          type: string
          description: Playlist name
        client_id:
          type: integer
          description: Current playlist client ID
        active:
          type: boolean
          default: true
          description: |-
            Enables/Disables playlist. Has two possible values:
            - true – Playlist can be played.
            - false – Playlist is disabled. No broadcast while it's desabled.
        start_time:
          type: string
          default: null
          description: >-
            Playlist start time. Playlist won't be available before the
            specified time. Datetime in ISO 8601 format.
        loop:
          type: boolean
          default: false
          description: Enables/Disables playlist loop
        video_ids:
          type: array
          description: |-
            A list of VOD IDs included in the playlist. Order of videos in a
            playlist reflects the order of IDs in the array.

            Maximum video limit = 128.
          items:
            type: integer
        client_user_id:
          type: integer
          description: Custom field where you can specify user ID in your system
        ad_id:
          type: integer
          description: The advertisement ID that will be inserted into the video
        player_id:
          type: integer
          description: The player ID with which the video will be played
        countdown:
          type: boolean
          description: >-
            Enables countdown before playlist start with ```playlist_type:
            live```
        playlist_type:
          type: string
          enum:
            - live
            - vod
          description: |-
            Determines whether the playlist:
            - `live` - playlist for live-streaming
            - `vod` - playlist is for video on demand access
        hls_url:
          type: string
          description: >-
            A URL to a master playlist HLS (master.m3u8) with MPEG TS container.
              


            This URL is a link to the main manifest. But you can also manually
            specify suffix-options that will allow you to change the manifest to
            your request:


            ```/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8```

            Please see the details in ```hls_url``` attribute of /videos/{id}
            method.
              


            Caution. Solely master.m3u8 (and master[-options].m3u8) is
            officially documented and intended for your use. Any additional
            internal manifests, sub-manifests, parameters, chunk names, file
            extensions, and related components are internal infrastructure
            entities. These may undergo modifications without prior notice, in
            any manner or form. It is strongly advised not to store them in your
            database or cache them on your end.
        hls_cmaf_url:
          type: string
          description: >-
            A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based
            chunks. Chunks are in fMP4 container.
              


            It is possible to use the same suffix-options as described in the
            "hls_url" attribute.
              


            Caution. Solely master.m3u8 (and master[-options].m3u8) is
            officially documented and intended for your use. Any additional
            internal manifests, sub-manifests, parameters, chunk names, file
            extensions, and related components are internal infrastructure
            entities. These may undergo modifications without prior notice, in
            any manner or form. It is strongly advised not to store them in your
            database or cache them on your end.
        iframe_url:
          type: string
          description: >-
            A URL to a built-in HTML video player with the video inside. It can
            be inserted into an iframe on your website and the video will
            automatically play in all browsers.


            The player can be opened or shared via this direct link. Also the
            video player can be integrated into your web pages using the Iframe
            tag.

              


            Please see the details in ```iframe_url``` attribute of /videos/{id}
            method.
      example:
        name: >-
          Playlist: Webinar 'Onboarding for new employees on working with the
          corporate portal'
        active: true
        start_time: '2024-07-01T11:00:00Z'
        loop: false
        video_ids:
          - 17800
          - 17801
        client_user_id: 2876
        countdown: true
        playlist_type: live
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````