Skip to main content

Basic usage

Generate a summary
import Bytez from 'bytez.js';

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

// choose your model
const model = sdk.model('ainize/bart-base-cnn');

// provide the model with input
const input = "The tower is 324 metres (1,063 ft) tall, about the same height as an 81-storey building, and the tallest structure in Paris. Its base is square, measuring 125 metres (410 ft) on each side. It was the first structure to reach a height of 300 metres. Excluding transmitters, the Eiffel Tower is the second tallest free-standing structure in France after the Millau Viaduct.";

// provide the model with params
const params = {
  "max_length": 40
};

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

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

I