Skip to main content

Basic usage

Example, sentiment analysis
import Bytez from 'bytez.js';

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

// choose your model
const model = sdk.model('AdamCodd/distilbert-base-uncased-finetuned-sentiment-amazon');

// provide the model with input
const input = "We are furious with the results of the experiment!";

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

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