Generate coherent text from an initial prompt for applications like story generation, dialogue systems, and creative writing.

Quickstart

Generate Text from a Prompt

Send a prompt to a model to generate text.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("Qwen/Qwen2-7B-Instruct");

const params = {
  max_new_tokens: 2000,
  min_new_tokens: 50,
  temperature: 0.5
};

const { error, output } = await model.run("Once upon a time there was a beautiful home where", params);

if (error) {
  console.error("Error:", error);
} else {
  console.log("Generated Text:", output);
}

Demo