> ## 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.

# Get clips

> Get list of non expired instant clips for a stream.

  


You can now use both MP4 just-in-time packager and HLS for all clips. Get URLs from "hls_master" and "mp4_master". 

  


**How to download renditions of clips:**

URLs contain "master" alias by default, which means maximum available quality from ABR set (based on height metadata). There is also possibility to access individual bitrates from ABR ladder. That works for both HLS and MP4. You can replace manually "master" to a value from renditions list in order to get exact bitrate/quality from the set.
Example:
- HLS 720p: ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_master.m3u8```
- HLS 720p: ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_media_1_360.m3u8```
- MP4 360p: ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_master.mp4```
- MP4 360p: ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_media_1_360.mp4```



## OpenAPI

````yaml /api-reference/services_documented/streaming_api.yaml get /streaming/streams/{stream_id}/clip_recording
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-15T06:37:28.230198+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/streams/{stream_id}/clip_recording:
    get:
      tags:
        - Streams
      summary: Get clips
      description: >-
        Get list of non expired instant clips for a stream.

          


        You can now use both MP4 just-in-time packager and HLS for all clips.
        Get URLs from "hls_master" and "mp4_master". 

          


        **How to download renditions of clips:**


        URLs contain "master" alias by default, which means maximum available
        quality from ABR set (based on height metadata). There is also
        possibility to access individual bitrates from ABR ladder. That works
        for both HLS and MP4. You can replace manually "master" to a value from
        renditions list in order to get exact bitrate/quality from the set.

        Example:

        - HLS 720p:
        ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_master.m3u8```

        - HLS 720p:
        ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_media_1_360.m3u8```

        - MP4 360p:
        ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_master.mp4```

        - MP4 360p:
        ```https://CID.domain.com/rec/111_1000/rec_d7bsli54p8n4_qsid42_media_1_360.mp4```
      operationId: get_streams_id_clip_recording
      parameters:
        - name: stream_id
          in: path
          description: Stream ID
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/clipId'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notfound'
      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
            )
            clips = client.streaming.streams.clips.list(
                0,
            )
            print(clips)
        - 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)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tclips, err := client.Streaming.Streams.Clips.List(context.TODO(), 0)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", clips)\n}\n"
components:
  schemas:
    clipId:
      allOf:
        - required:
            - id
          properties:
            id:
              type: string
              description: ID of the clip
            created_at:
              type: string
              description: Creation date and time. Format is date time in ISO 8601
            vod_required:
              type: boolean
              description: Indicates if video needs to be stored as VOD
              default: true
            video_id:
              type: integer
              description: ID of the created video if `vod_required`=true
              default: null
            renditions:
              type: array
              items:
                type: string
              description: List of available rendition heights
            hls_master:
              type: string
              description: >-
                Link to HLS .m3u8 with immediate clip. The link retains same
                adaptive bitrate as in the stream for end viewers. For
                additional restrictions, see the description of parameter
                "mp4_master".
            mp4_master:
              type: string
              description: >-
                Link to MP4 with immediate clip. The link points to max
                rendition quality.

                Request of the URL can return:

                - 200 OK – if the clip exists.

                - 404 Not found – if the clip did not exist or has already
                ceased to exist.

                - 425 Too early – if recording is on-going now. The file is
                incomplete and will be accessible after start+duration time will
                come.
          example:
            id: d7bsli54p8n4
            created_at: '2024-01-05T20:15:00.000Z'
            vod_required: true
            video_id: 459857
            renditions:
              - media_1_360
              - media_2_468
              - media_3_720
              - media_4_1080
            hls_master: >-
              https://CID.domain.com/rec/12345_330031/rec_d7bsli54p8n4_qsid42_master.m3u8
            mp4_master: >-
              https://CID.domain.com/rec/12345_330031/rec_d7bsli54p8n4_qsid42_master.mp4
        - $ref: '#/components/schemas/clipBase'
    notfound:
      allOf:
        - $ref: '#/components/schemas/badrequest'
        - example:
            status: 404
            error: >-
              Not Found. Entity you are looking for was not found, please check
              the initial parameters
    clipBase:
      type: object
      required:
        - duration
      properties:
        start:
          type: integer
          description: >-
            Starting point of the segment to cut. 


            Unix timestamp in seconds, absolute value.

            Example: ```24.05.2024 14:00:00 (GMT) is Unix timestamp =
            1716559200```


            If a value from the past is specified, it is used as the starting
            point for the segment to cut. If the value is omitted, then clip
            will start from now.
          default: null
        duration:
          type: integer
          description: >-
            Requested segment duration in seconds to be cut.


            Please, note that cutting is based on the idea of instantly creating
            a clip, instead of precise timing. So final segment may be:

            - Less than the specified value if there is less data in the DVR
            than the requested segment.

            - Greater than the specified value, because segment is aligned to
            the first and last key frames of already stored fragment in DVR,
            this way -1 and +1 chunks can be added to left and right.


            Duration of cutted segment cannot be greater than DVR duration for
            this stream. Therefore, to change the maximum, use "dvr_duration"
            parameter of this stream.
        expiration:
          type: integer
          description: >-
            Expire time of the clip via a public link.


            Unix timestamp in seconds, absolute value.


            This is the time how long the instant clip will be stored in the
            server memory and can be accessed via public HLS/MP4 links. Download
            and/or use the instant clip before this time expires.


            After the time has expired, the clip is deleted from memory and is
            no longer available via the link. You need to create a new segment,
            or use ```vod_required: true``` attribute.


            If value is omitted, then expiration is counted as +3600 seconds (1
            hour) to the end of the clip (i.e. ```unix timestamp = <start> +
            <duration> + 3600```).


            Allowed range: 1m <= expiration <= 4h.


            Example: ```24.05.2024 14:00:00 (GMT) + 60 seconds of duration +
            3600 seconds of expiration = 24.05.2024 15:01:00 (GMT) is Unix
            timestamp = 1716562860```
          default: null
      example:
        start: 1716559200
        duration: 60
        expiration: 1716562860
    badrequest:
      type: object
      properties:
        status:
          type: integer
          description: Error number
        error:
          type: string
          description: Error message
      example:
        status: 400
        error: >-
          Bad Request response status code indicates that the server cannot or
          will not process the request due to something that is perceived to be
          a client error (for example, malformed request syntax, invalid request
          message framing, or deceptive request routing).
  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

````