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

# Get Collection

> Retrieve details about a specific collection



## OpenAPI

````yaml GET /collections/{collection_id}
openapi: 3.0.0
info:
  title: Cloudglue API
  description: API for Cloudglue
  license:
    name: Apache License 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.7.8
servers:
  - url: https://api.cloudglue.dev/v1
security:
  - bearerAuth: []
paths:
  /collections/{collection_id}:
    get:
      tags:
        - Collections
      summary: Retrieve details about a specific collection
      description: Retrieve details about a specific collection
      operationId: getCollection
      parameters:
        - name: collection_id
          in: path
          required: true
          description: The ID of the collection to retrieve
          schema:
            type: string
      responses:
        '200':
          description: Collection details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
        '404':
          description: Collection not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: An unexpected error occurred on the server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Collection:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the collection
        object:
          type: string
          enum:
            - collection
          description: Object type, always 'collection'
        name:
          type: string
          description: Name of the collection
        description:
          type: string
          nullable: true
          description: >-
            Description of the collection's purpose or contents, null if none
            provided
        collection_type:
          type: string
          enum:
            - media-descriptions
            - entities
            - rich-transcripts
            - face-analysis
          description: >-
            Type of collection, determines how videos are processed and what
            data is extracted
        extract_config:
          type: object
          description: >-
            Configuration for automatic entity extraction from videos. Required
            when collection_type is 'entities'.
          properties:
            prompt:
              type: string
              description: >-
                A natural language prompt describing the data to extract.
                Required if no schema is provided.
            schema:
              type: object
              description: >-
                A more rigid structure if you already know the JSON layout you
                want. Required if no prompt is provided.
            enable_video_level_entities:
              type: boolean
              description: >-
                Whether to extract entities at the video level. Mutually
                exclusive with enable_segment_level_entities - only one can be
                true.
            enable_segment_level_entities:
              type: boolean
              description: >-
                Whether to extract entities at the segment level. Mutually
                exclusive with enable_video_level_entities - only one can be
                true.
            enable_transcript_mode:
              type: boolean
              description: >-
                When enabled, extract entities from transcript only. Useful for
                speech-heavy content.
        transcribe_config:
          type: object
          description: >-
            Configuration for rich transcription from videos. Used when
            collection_type is 'rich-transcripts'. If not provided, default
            values will be used.
          properties:
            enable_summary:
              type: boolean
              description: >-
                Whether to generate video-level and segment-level (moment-level)
                summaries and titles
            enable_speech:
              type: boolean
              description: Whether to generate speech transcript
            enable_scene_text:
              type: boolean
              description: Whether to generate scene text extraction
            enable_visual_scene_description:
              type: boolean
              description: Whether to generate visual scene description
            enable_audio_description:
              type: boolean
              description: Whether to generate audio description
        describe_config:
          type: object
          description: >-
            Configuration for comprehensive media description from videos. Used
            when collection_type is 'media-descriptions'. If not provided,
            default values will be used.
          properties:
            enable_summary:
              type: boolean
              description: >-
                Whether to generate video-level and segment-level (moment-level)
                summaries and titles
            enable_speech:
              type: boolean
              description: Whether to generate speech transcript
            enable_scene_text:
              type: boolean
              description: Whether to generate scene text extraction
            enable_visual_scene_description:
              type: boolean
              description: Whether to generate visual scene description
            enable_audio_description:
              type: boolean
              description: Whether to generate audio description
        default_segmentation_config:
          $ref: '#/components/schemas/SegmentationConfig'
          description: Default segmentation configuration used for files in this collection
        default_thumbnails_config:
          $ref: '#/components/schemas/ThumbnailsConfig'
          description: Default thumbnails configuration used for files in this collection
        face_detection_config:
          type: object
          nullable: true
          description: >-
            Configuration for face detection in videos. Only present when
            collection_type is 'face-analysis'.
          properties:
            frame_extraction_config:
              type: object
              properties:
                strategy:
                  type: string
                  enum:
                    - uniform
                  description: Frame extraction strategy
                uniform_config:
                  type: object
                  properties:
                    frames_per_second:
                      type: number
                      minimum: 0.1
                      maximum: 30
                      description: Number of frames to extract per second
                    max_width:
                      type: number
                      minimum: 64
                      maximum: 4096
                      description: >-
                        Maximum width of frames in pixels (aspect ratio
                        preserved)
              required:
                - strategy
            thumbnails_config:
              type: object
              properties:
                enable_frame_thumbnails:
                  type: boolean
                  description: Whether to generate thumbnails for extracted frames
        created_at:
          type: integer
          description: Unix timestamp in milliseconds when the collection was created
        file_count:
          type: integer
          description: Number of files in the collection
      required:
        - id
        - object
        - name
        - created_at
        - file_count
        - collection_type
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    SegmentationConfig:
      type: object
      description: >-
        Configuration for video segmentation. **Choose a strategy and provide
        ONLY the corresponding config:**


        • **uniform**: Provide `uniform_config`, do NOT provide other configs

        • **shot-detector**: Provide `shot_detector_config`, do NOT provide
        other configs

        • **manual**: Provide `manual_config`, do NOT provide other configs

        • **narrative**: Provide `narrative_config`, do NOT provide other
        configs


        Optionally specify `start_time_seconds` and `end_time_seconds` to limit
        segmentation to a portion of the video.
      required:
        - strategy
      properties:
        strategy:
          type: string
          enum:
            - uniform
            - shot-detector
            - manual
            - narrative
          description: Segmentation strategy - determines which config you must provide
        uniform_config:
          $ref: '#/components/schemas/SegmentationUniformConfig'
          description: >-
            🎯 **REQUIRED when strategy = 'uniform'** - Configuration for
            uniform segmentation.
        shot_detector_config:
          $ref: '#/components/schemas/SegmentationShotDetectorConfig'
          description: >-
            🎯 **REQUIRED when strategy = 'shot-detector'** - Configuration for
            shot detection segmentation.
        manual_config:
          $ref: '#/components/schemas/SegmentationManualConfig'
          description: >-
            🎯 **REQUIRED when strategy = 'manual'** - Configuration for manual
            segmentation.
        narrative_config:
          $ref: '#/components/schemas/NarrativeConfig'
          description: >-
            🎯 **REQUIRED when strategy = 'narrative'** - Configuration for
            narrative-based chapter segmentation using AI analysis.
        keyframe_config:
          $ref: '#/components/schemas/KeyframeConfig'
          description: >-
            When provided, will be used to extract keyframes for the
            segmentation.
        start_time_seconds:
          type: number
          minimum: 0
          description: >-
            Optional: The start time of the video in seconds to start segmenting
            from
        end_time_seconds:
          type: number
          minimum: 0
          description: 'Optional: The end time of the video in seconds to stop segmenting at'
    ThumbnailsConfig:
      type: object
      required:
        - enable_segment_thumbnails
      properties:
        enable_segment_thumbnails:
          type: boolean
          description: >-
            Whether to enable segment thumbnails. If not provided will use
            default to false. Cannot be used together with segmentation_id.
    SegmentationUniformConfig:
      type: object
      required:
        - window_seconds
      properties:
        window_seconds:
          type: number
          minimum: 1
          maximum: 120
          description: >-
            The duration of each segment in seconds. Must be between 1 and 120
            seconds.
        hop_seconds:
          type: number
          minimum: 1
          maximum: 120
          description: >-
            The offset between the start of new windows. This means there can be
            overlap between segments. If not provided, defaults to
            window_seconds. Must be between 1 and 120 seconds.
    SegmentationShotDetectorConfig:
      type: object
      required:
        - detector
      properties:
        threshold:
          type: number
          nullable: true
          description: >-
            Detection sensitivity threshold - lower values create more segments:


            • **content**: Sensitivity to visual differences (default: 27.0).
            Lower values detect smaller changes in color/lighting.

            • **adaptive**: Does not support threshold parameter - uses internal
            adaptive algorithm.
        min_seconds:
          type: number
          minimum: 0.6
          maximum: 600
          nullable: true
          description: The minimum length of a shot in seconds. Defaults to 0.6.
        max_seconds:
          type: number
          minimum: 1
          maximum: 600
          nullable: true
          description: The maximum length of a shot in seconds. Defaults to 300.
        detector:
          type: string
          enum:
            - adaptive
            - content
          description: >-
            The detector strategy to use:


            • **adaptive**: Designed for dynamic footage with camera movement,
            panning, or action. Examples: sports broadcasts, drone footage,
            handheld documentaries, action movies, live events.

            • **content**: Optimized for controlled footage with clear visual
            transitions. Examples: studio interviews, corporate videos,
            educational content, product demos, scripted content.
        fill_gaps:
          type: boolean
          description: >-
            When true, gaps between detected shots are filled: gaps greater than
            or equal to min_seconds become their own segments (split by
            max_seconds if needed), and shorter gaps are merged into the nearest
            adjacent segment. Defaults to true.
    SegmentationManualConfig:
      type: object
      required:
        - segments
      properties:
        segments:
          type: array
          items:
            type: object
            properties:
              start_time:
                type: number
                description: The start time of the segment in seconds
              end_time:
                type: number
                description: The end time of the segment in seconds
          description: Array of segments
    NarrativeConfig:
      type: object
      properties:
        prompt:
          type: string
          description: >-
            Optional custom prompt to guide the narrative segmentation analysis.
            This will be incorporated into the main segmentation prompt as
            additional guidance.
        strategy:
          type: string
          enum:
            - comprehensive
            - balanced
            - transcript
          description: >-
            Narrative segmentation strategy:


            • **comprehensive**: Uses a VLM to deeply analyze logical segments
            of video. Only available for video files (not YouTube or audio).


            • **balanced** (default): Balanced analysis approach using multiple
            modalities. Supports YouTube URLs and audio files.


            • **transcript**: Cheap and fast speech-transcript-based
            segmentation. Requires a transcript; returns an error for silent or
            visual-only content (use `balanced` instead, or `comprehensive` for
            non-YouTube/non-audio video files).


            **Note**: YouTube URLs and audio files only support the **balanced**
            and **transcript** strategies; **comprehensive** will be rejected
            with an error.
        number_of_chapters:
          type: integer
          minimum: 1
          description: >-
            Optional target number of chapters to generate. If provided,
            min_chapters and max_chapters will be calculated automatically if
            not specified. If only target is provided, the AI will attempt to
            generate exactly this number of chapters.
        min_chapters:
          type: integer
          minimum: 1
          description: >-
            Optional minimum number of chapters to generate. If provided along
            with number_of_chapters and max_chapters, validates that min <=
            number_of_chapters <= max. If only number_of_chapters is provided,
            min and max are calculated automatically.
        max_chapters:
          type: integer
          minimum: 1
          description: >-
            Optional maximum number of chapters to generate. If provided along
            with number_of_chapters and min_chapters, validates that min <=
            number_of_chapters <= max. If only number_of_chapters is provided,
            min and max are calculated automatically.
    KeyframeConfig:
      type: object
      required:
        - frames_per_segment
      description: >-
        Configuration for keyframe extraction. When provided, will be used to
        extract keyframes for the segmentation. This is not supported for
        YouTube videos.
      properties:
        frames_per_segment:
          type: number
          minimum: 0
          maximum: 8
          description: The number of key frames to extract per segment
        max_width:
          type: number
          minimum: 144
          maximum: 4320
          description: The maximum width of the key frames in pixels
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````