demo · v138

Summarizer

Paste an article, pick a style and length. The built-in summariser runs on-device and prints a result. If unavailable, the demo falls back to a heuristic first-sentence-per-paragraph summariser so the shape is still clear.

Enable chrome://flags/#summarizer-api and let the Gemini Nano model download (one-time). Without it the demo runs a heuristic so you can still drive the UI.
checking support…
Ready.

the code

// 138+:
const s = await Summarizer.create({
  type: "key-points",
  format: "markdown",
  length: "short",
});
const out = await s.summarize(article);
// streaming variant:
for await (const chunk of s.summarizeStreaming(article)) {
  // append chunk
}

see also