demo · v131

Four summary formats, one input

The Summarizer API takes a type (key-points, tl;dr, teaser, headline) AND a format (markdown, plain-text) AND a length (short, medium, long). Run all four type values against the same input and compare what the on-device model returns — useful for picking the right preset for a UI.

flags Enable chrome://flags/#summarization-api-for-gemini-nano and visit chrome://components to ensure the Optimization Guide model is downloaded. On unsupported devices the demo will show the rejection.

key-points

tl;dr

teaser

headline

the api

const s = await Summarizer.create({
  type: "key-points",   // or tl;dr, teaser, headline
  format: "markdown",
  length: "short"
});
const summary = await s.summarize(text, { context: "..." });

see also