Categorize images into predefined classes for tasks like object recognition, medical imaging, and security systems..

Quickstart

Classify an Image

Send an image to a model to generate classification labels.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("google/vit-base-patch16-224");

const imgUrl = "https://www.padoniavets.com/sites/default/files/field/image/cats-and-dogs.jpg";

const { error, output: labelObjects } = await model.run(imgUrl);

if (error) {
  console.error("Error:", error);
} else {
  labelObjects.forEach(({ label, score }) => {
    console.log({ label, score });
  });
}

Demo