---
title: Using the Summarizer API in Google Chrome
url: https://calvin.my/posts/using-the-summarizer-api-in-google-chrome
published: 2025-07-20
updated: 2026-09-16
category: AI
tags:
- Gemini Nano
- Chorme
- webAI
summary: The article explains how to use Chrome’s on-device Summarizer API with Gemini Nano to generate headlines, key points, teasers, or TLDRs from long text. It outlines desktop Chrome version and feature-flag requirements, then describes checking API support and model availability, configuring summary style and length, monitoring model downloads, and receiving results as a stream. The API requires an initial user gesture and does not currently support mobile Chrome.
---

# Using the Summarizer API in Google Chrome

This article is an update for the previous articles below:

1. [https://calvin.my/posts/on-device-generative-ai-with-gemini-nano](../posts/on-device-generative-ai-with-gemini-nano)
2. [https://calvin.my/posts/on-device-generative-ai-with-gemini-nano-part-2](../posts/on-device-generative-ai-with-gemini-nano-part-2)
3. [https://calvin.my/posts/api-updates-on-chrome-on-device-ai](../posts/api-updates-on-chrome-on-device-ai)
4. [https://calvin.my/posts/api-updates-on-chrome-on-device-ai-nov-2024](../posts/api-updates-on-chrome-on-device-ai-nov-2024)
5. [https://calvin.my/posts/api-updates-on-chrome-on-device-ai-apr-2025](../posts/api-updates-on-chrome-on-device-ai-apr-2025)

* * *

## Pre-requisites

1. Chrome version 138 or above. (Mobile Chrome is not supported currently)

2. In the past, the "[Optimization Guide on device](chrome://flags/#optimization-guide-on-device-model)" flag should be set to "EnabledBypassPerfRequirement". (Document here for reference purposes)

   ```markup
   chrome://flags/#optimization-guide-on-device-model
   ```

3. Enable the "[Summarization API](chrome://flags/#summarization-api-for-gemini-nano)" flag.

   ```markup
   chrome://flags/#summarization-api-for-gemini-nano
   ```

* * *

## Summarizer API

This API is optimized to provide headlines, key points, or TLDR of a much longer text, using Gemini Nano. The API must be triggered from a User Gesture (e.g., a button click) when you use it for the first time.

1. To start, check if the API is supported.

   ```javascript
   if ('Summarizer' in self) {

   }
   ```

2. Check if the API is ready to use. (E.g., if the browser downloads the model to your device)

   ```javascript
   const availability = await Summarizer.availability();
   if (availability === "unavailable") { 

   } // could also be downloading, downloadable, available
   ```

3. Specify what it does.

   ```javascript
   const options = {
       sharedContext: "This is a blog post about Generative AI",
       type: 'tldr', // Or teaser, key-points, headline
       format: 'plain-text', // Or markdown
       length: 'medium', // Or short, long
       monitor(m) {
           m.addEventListener('downloadprogress', (e) => {
               console.log(`Downloaded ${e.loaded * 100}%`);
           });
       }
   };
   ```

4. Getting the result.

   ```javascript
   const summarizer = await Summarizer.create(options);
   const longText = "The very long text";
   const stream = summarizer.summarizeStreaming(longText, {
       context: 'Analyse the content and provide a suitable headlines. Do not include any codes in your result.',
   });
   for await (const chunk of stream) {
       console.log(chunk);
   }
   ```

* * *

## The result

You can check the bottom section of this page for a summary of this article, written by the Summerizer API.
