Basic usage
Basic usage
Send an image to a model to generate classification labels
Copy
import Bytez from 'bytez.js';
// insert your key
const sdk = new Bytez('BYTEZ_KEY');
// choose your model
const model = sdk.model('google/vit-base-patch16-224');
// provide the model with input
const input = {
"url": "https://www.padoniavets.com/sites/default/files/field/image/cats-and-dogs.jpg"
};
// send to the model
const { error, output } = await model.run(input);
// observe the output
console.log({ error, output });