Basic usage
Basic usage
Generate images using text
Copy
import Bytez from 'bytez.js';
// insert your key
const sdk = new Bytez('BYTEZ_KEY');
// choose your model
const model = sdk.model('dreamlike-art/dreamlike-photoreal-2.0');
// provide the model with input
const input = "A beautiful landscape with mountains and a river";
// send to the model
const { error, output } = await model.run(input);
// observe the output
console.log({ error, output });