Image Generation

Generated Image

API Usage

// JavaScript example
fetch('/chat?prompt=cat&model=@cf/stabilityai/stable-diffusion-xl-base-1.0')
  .then(response => response.blob())
  .then(blob => {
    const url = URL.createObjectURL(blob);
    const img = document.createElement('img');
    img.src = url;
    document.body.appendChild(img);
  });