v138 · miscellaneous
Summarizer API
Summarizer API is a JavaScript API for producing summaries of input text, backed by an AI language model. Browsers and operating systems are increasingly expected to gain access to a language model. By exposing this built-in model, we avoid every website needing to download their own multi-gigabyte language model, or send input text to third-party APIs. The
concepts
-
Summarize
On-device summariser — runs against the same model family as Translator/Prompt. No network round-trip; content never leaves the device.
-
Format and length
Side-by-side comparison of two configurations on the same input. Twiddle
type,format, andlength— see how each knob reshapes the output. -
Streaming + shared context
Watch
summarizeStreaming()tick out token-by-token. SwitchsharedContext(executive vs accessibility vs onboarding vs security) to re-summarise the same article for different audiences, with per-callcontexton top. Cancel mid-stream withAbortSignal. -
Progressive summary
Paste a long article and get summaries at three lengths (short, medium, long) simultaneously, each streaming token-by-token via
summarizeStreaming(). See how the same content is progressively compressed, with word-count badges showing each output length.
why it shipped
Browsers and operating systems are increasingly expected to gain access to a language model. By exposing this built-in model, we avoid every website needing to download their own multi-gigabyte language model, or send input text to third-party APIs. The summarizer API in particular exposes a high-level API for interfacing with a language model in order to summarize inputs for a variety of use cases [1], in a way that does not depend on the specific language model in question.