demo · v131

availability probe + model download

The Summarizer API is gated on a multi-gigabyte on-device model. Summarizer.availability(options) returns one of four states; Summarizer.create() with a monitor can wire up download progress. This page probes each shape and surfaces the underlying lifecycle.

flags Needs Chrome 131+. Enable chrome://flags/#summarization-api-for-gemini-nano and visit chrome://components to trigger model download. On unsupported builds the probe will report unavailable.

probe a configuration

surface
checking...
last availability
download bytes
elapsed

log

Ready. Press a button to probe.

the four states

  1. available

    Model + options ready. create() resolves immediately.

  2. downloadable

    Model not on disk. Calling create() will trigger the download. Wire monitor to render progress.

  3. downloading

    A previous call is already pulling the model. Subscribing again attaches a new progress listener.

  4. unavailable

    Hardware, OS, or output language doesn't qualify. Fall back to a server summary.

the api

// Probe before paying the download cost.
const status = await Summarizer.availability({
  type: "key-points",
  format: "markdown",
  length: "medium",
  outputLanguage: "en",
});

// Render UI based on the four-state union before committing to create().
if (status === "available" || status === "downloadable") {
  const s = await Summarizer.create({
    type: "key-points",
    monitor(m) {
      m.addEventListener("downloadprogress", e => render(e.loaded));
    },
  });
}

see also