Documentation

Images

Generating an image

To query an image model, use the .images method and specify the image model you want to use.

Python Copy
from bytecompute import bytecompute

client = bytecompute()

response = client.images.generate(
    prompt="a flying cat", model="black-forest-labs/FLUX.1-schnell", steps=4
)

print(response.data[0].url)
TypeScript Copy
import bytecompute from "bytecompute-ai";

const bytecompute = new bytecompute();

async function main() {
  const response = await bytecompute.images.create({
    prompt: "a flying cat",
    model: "black-forest-labs/FLUX.1-schnell",
    steps: 4,
  });
  // @ts-ignore
  console.log(response.data[0].url);
}

main();

Supported image models

See our models page for supported image models.

Safety Checker

We have a built in safety checker that detects NSFW words but you can disable it by passing in "disable_safety_checker": "true". This works for every model except Flux Schnell Free and Flux Pro.

Python Copy
from bytecompute import bytecompute

client = bytecompute()

response = client.images.generate(
    prompt="a flying cat",
    model="black-forest-labs/FLUX.1-schnell",
    steps=4,
    disable_safety_checker=True,
)

print(response.data[0].url)
TypeScript Copy
import bytecompute from 'bytecompute-ai';

const bytecompute = new bytecompute();

async function main() {
  const response = await bytecompute.images.create({
    prompt: 'a flying cat',
    model: 'black-forest-labs/FLUX.1-schnell',
    steps: 4,
    // @ts-ignore
    disable_safety_checker: true,
  });
  console.log(response.data[0].url);
}

main();