Skip to main content

Basic usage

Send an image to a model to detect objects and get bounding boxes
import Bytez from 'bytez.js';

// insert your key
const sdk = new Bytez('BYTEZ_KEY');

// choose your model
const model = sdk.model('facebook/detr-resnet-50');

// provide the model with input
const input = {
  "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Cat_November_2010-1a.jpg/1200px-Cat_November_2010-1a.jpg"
};

// send to the model
const { error, output } = await model.run(input);

// observe the output
console.log({ error, output });

I