Skip to main content
POST
/
collections
/
{collection_id}
/
media
Add a media file to a collection
curl --request POST \
  --url https://api.cloudglue.dev/v1/collections/{collection_id}/media \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_id": "<string>",
  "segmentation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'
{
  "collection_id": "<string>",
  "file_id": "<string>",
  "added_at": 123,
  "file": {
    "id": "<string>",
    "uri": "<string>",
    "bytes": 123,
    "created_at": 123,
    "filename": "<string>",
    "metadata": {},
    "media_info": {
      "duration_seconds": 123,
      "width": 123,
      "height": 123,
      "sample_rate": 123,
      "channels": 123,
      "bitrate": 123,
      "format": "<string>",
      "has_audio": true
    },
    "video_info": {
      "duration_seconds": 123,
      "height": 123,
      "width": 123,
      "format": "<string>",
      "has_audio": true
    },
    "thumbnail_url": "<string>",
    "source_metadata": {
      "grain_recording_id": "<string>",
      "title": "<string>",
      "start_datetime": "2023-11-07T05:31:56Z",
      "end_datetime": "2023-11-07T05:31:56Z",
      "duration_ms": 123,
      "grain_url": "<string>",
      "tags": [
        "<string>"
      ],
      "teams": [
        {
          "id": "<string>",
          "name": "<string>"
        }
      ],
      "thumbnail_url": "<string>",
      "meeting_type": {
        "id": "<string>",
        "name": "<string>",
        "scope": "<string>"
      },
      "participants": [
        {
          "id": "<string>",
          "name": "<string>",
          "email": "<string>",
          "confirmed_attendee": true,
          "hs_contact_id": "<string>"
        }
      ],
      "highlights": [
        {}
      ],
      "ai_summary": {
        "text": "<string>"
      },
      "ai_action_items": [
        {
          "timestamp_ms": 123,
          "text": "<string>",
          "assignee": {
            "id": "<string>",
            "name": "<string>",
            "user_id": "<string>"
          }
        }
      ],
      "ai_template_sections": [
        {}
      ],
      "calendar_event": {
        "ical_uid": "<string>"
      },
      "hubspot": {
        "hubspot_company_ids": [
          "<string>"
        ],
        "hubspot_deal_ids": [
          "<string>"
        ]
      }
    }
  },
  "segmentation": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "segmentation_config": {
      "uniform_config": {
        "window_seconds": 60.5,
        "hop_seconds": 60.5
      },
      "shot_detector_config": {
        "threshold": 123,
        "min_seconds": 300.5,
        "max_seconds": 300.5,
        "fill_gaps": true
      },
      "manual_config": {
        "segments": [
          {
            "start_time": 123,
            "end_time": 123
          }
        ]
      },
      "narrative_config": {
        "prompt": "<string>",
        "number_of_chapters": 2,
        "min_chapters": 2,
        "max_chapters": 2
      },
      "keyframe_config": {
        "frames_per_segment": 4,
        "max_width": 2232
      },
      "start_time_seconds": 1,
      "end_time_seconds": 1
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

collection_id
string
required

The ID of the collection to add the media file to

Body

application/json

File association parameters

file_id
string
required

The ID of the file to add to the collection

segmentation_id
string<uuid>

Segmentation job id to use. If not provided will use default to uniform 20s segmentation. Cannot be provided together with segmentation_config.

segmentation_config
object

Configuration for video segmentation. Cannot be provided together with segmentation_id.

thumbnails_config
object

Response

Successful file addition

collection_id
string
required

ID of the collection

file_id
string
required

ID of the file

object
enum<string>
required

Object type, always 'collection_file'

Available options:
collection_file
added_at
integer
required

Unix timestamp in milliseconds when the file was added to the collection

status
enum<string>
required

Overall processing status of the file in this collection

Available options:
pending,
processing,
completed,
failed,
not_applicable
file
object

The file object

segmentation
object

Segmentation information for this file in the collection. Only present when the file has been segmented.