The wrapper is written in
TypeScript and has first class support for it.Installation
To install the Cloudglue JavaScript SDK:- npm
- pnpm
- yarn
bash npm install @cloudglue/cloudglue-js Usage
- Get an API key from cloudglue.dev
- Set the API key as an environment variable named
CLOUDGLUE_API_KEYor pass the api key in as a parameter to theCloudglueclass constructor
Working with Files
To use most Cloudglue APIs you’ll need to operate on a file uploaded into Cloudglue. Below are the basics for working with files:- Handle the file reading properly with error checking
- Set the correct MIME type for your video file (e.g., ‘video/mp4’, ‘video/quicktime’, etc.)
- Include relevant metadata about the upload
- Handle potential upload errors appropriately
Generating Media Descriptions
You can use ourDescribe API to generate multimodal media descriptions from videos. Getting started is easy, just specify the video you want to describe and the configuration of the description.
Note that YouTube videos are currently limited to speech and metadata level
understanding, for fully fledged multimodal video understanding please upload
a file instead to the Cloudglue Files API and use that input instead.
Extracting Structured Information from Videos
Organizing information in structured entity schemas allow for response types that are easy to program AI applications against. Let’s get started with extracting structured entity information from videos.Prompt Only Extraction
Below we’ll show how to extract information from a video using natural language to guide entire process. This is particularly helpful during the exploratory phase where your entity structure may not be completely known yet.Note that YouTube videos are currently limited to speech and metadata level
understanding, for fully fledged multimodal video understanding please upload
a file instead to the Cloudglue Files API and use that input instead.