Generate textual descriptions from images for tasks like image captioning, content generation, and accessibility features.

Quickstart

Generate a Caption from an Image

Send an image to a model to generate a textual description.

import Bytez from "bytez.js";

const client = new Bytez("YOUR_BYTEZ_KEY_HERE");
const model = client.model("Salesforce/blip-image-captioning-base");

const inputImage = "https://as1.ftcdn.net/v2/jpg/03/03/55/82/1000_F_303558268_YNUQp9NNMTE0X4zrj314mbWcDHd1pZPD.jpg";

const { error, output } = await model.run(inputImage);

if (error) {
  console.error("Error:", error);
} else {
  console.log("Generated Caption:", output[0].generated_text);
}

Demo