Basic usage
Basic usage
For example, ask a model to describe an image
Copy
import Bytez from 'bytez.js';
// insert your key
const sdk = new Bytez('BYTEZ_KEY');
// choose your model
const model = sdk.model('Salesforce/blip-image-captioning-base');
// provide the model with input
const input = {
"url": "https://as1.ftcdn.net/v2/jpg/03/03/55/82/1000_F_303558268_YNUQp9NNMTE0X4zrj314mbWcDHd1pZPD.jpg"
};
// send to the model
const { error, output } = await model.run(input);
// observe the output
console.log({ error, output });