Categorize videos into predefined classes for applications in video content analysis, security surveillance, and media organization.

Quickstart

Classify a Video

Send a video input URL to classify its contents.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("ahmedabdo/video-classifier");

const videoUrl = "https://video-previews.elements.envatousercontent.com/6d07b79d-b17a-47b5-9d24-4fe984c7ca36/watermarked_preview/watermarked_preview.mp4";

const { error, output } = await model.run(videoUrl);

if (error) {
  console.error("Error:", error);
} else {
  const [labelObjects] = output;
  labelObjects.sort((a, b) => b.score - a.score);
  
  for (const labelObject of labelObjects) {
    console.log(labelObject);
    const { score, label } = labelObject;
    console.log({ score, label });
  }
}

Demo