Gemini Nano Chrome banner
Ar9av Ar9av

Gemini Nano Chrome

Development community

Description

Using Gemini Nano through Chrome's built-in Prompt API, with scripts to automate setup and verification

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Gemini Nano in Chrome

Chrome ships a small local language model, Gemini Nano, built into the browser. It's exposed through a JavaScript API called the Prompt API (`LanguageModel`). No API key, no server, no external network calls once the model is downloaded. Everything runs on the user's machine.

This repo covers how to turn it on and what the API can do. It also includes scripts that automate setup and verification end to end.

Run it

git clone https://github.com/Ar9av/gemini-nano-chrome.git
cd gemini-nano-chrome
npm start

One command: launches Chrome with the right flags set (no manual `chrome://flags` clicking), starts the OpenAI-compatible API server, serves the chat UI, and opens it in a new tab. First run downloads the ~4 GB model, so give it a few minutes; `npm start` again afterward reuses the same Chrome instance and is instant.

Chat UI:    http://localhost:8123
API server: http://localhost:8788/v1/chat/completions

Everything below explains what that command is doing and how to use each piece directly, in case you want more control than one script gives you.

Requirements

Chrome 138+ (Dev or Canary channel recommended; this repo was verified on 149)
OS Windows 10/11, macOS 13+, Linux, or ChromeOS on a Chromebook Plus
Storage 22 GB free
GPU 4 GB+ VRAM, or
CPU 16 GB+ RAM and 4+ cores
Network Unmetered connection for the one-time ~4 GB model download

Enabling it

  1. Open chrome://flags/#optimization-guide-on-device-model and set it to Enabled BypassPerfRequirement
  2. Open chrome://flags/#prompt-api-for-gemini-nano and set it to Enabled
  3. Relaunch Chrome (the flags page has a button for this)

That's the whole setup. Everything else happens through JavaScript.

Quick start

Open DevTools on any page and run:

const availability = await LanguageModel.availability();
console.log(availability); // "unavailable" | "downloadable" | "downloading" | "a