Skip to Content
Platform.Ontology

Prompt API (LanguageModel, Gemini Nano)

Runs a local language model in Chrome and lets a page prompt it.

Works without askingOn-device AIBuilt in AIWeb browsersWhile you use it

In one line

Can run a small AI model on your device with text you give the page

Runs a local language model in Chrome and lets a page prompt it.

Page text and the person's input stay on the device. The page can summarise, classify or chat without sending data to a server.

What it can and can't do

What the user does: You tap a button like Summarize, Reply or Ask AI on the page

It can

  • Send the page text or your message to a local AI model
  • Get summaries, labels, smart replies or chat answers without a server
  • Download the model the first time, which can take a while

It cannot

  • Start before a click or tap
  • Send your text to a server for this feature
  • Work in Firefox, Safari or on Chrome for Android
  • Run on computers without enough space and a capable chip

How it differs between platforms: Chrome on desktop supports it; Edge is in testing. Firefox, Safari and all phones do not.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported1482026-05-05None
EdgeBehind a flag138Not listedBehind flag
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNone
Safari on iPhoneNot supportedNot availableNot listedNo iOS
Chrome on AndroidNot supportedNot availableNot listedNo Android
Samsung InternetNot supportedNot availableNot listedNone

How a site asks for it

APIawait LanguageModel.availability(); const s = await LanguageModel.create({temperature,topK,initialPrompts,expectedInputs}); s.prompt(text), promptStreaming()
Permissions policylanguage-model
Browser compat keysapi.LanguageModel
How access is grantedgesture
What the user seesDownload progress on first use; user activation needed before create()
Needs a secure context (HTTPS)Yes
Needs a user gestureYes
How long it lastsModel stays on disk until eviction (below 10 GB free)
How to take it backchrome://on-device-internals
Inside an iframeSame as top level; cross-origin iframes need a permissions policy where listed

Typical flow

  1. Call the API
  2. Browser applies its access rules
  3. Page receives the result

Data you get

What comes back: Runs a local language model in Chrome and lets a page prompt it.
Shape: object
How often: on demand

FieldTypeUnitRangePrecision
availabilityenumNoneunavailable, downloadable, downloading, availableNot listed
contextWindowintegertokensmodel defined, reported at runtimecontextUsage and contextoverflow event
languageslistNoneen, ja, es, de, frinput and output
input typeslistNonetext, image (several element types), audio (AudioBuffer, ArrayBuffer, Blob)output is text only
temperature / topKfloatNoneextensions: default topK 3, max 128; default temp 1, max 2must be set together

Technical limits

  • Hardware: Windows 10 or 11, macOS 13+, Linux, or ChromeOS Plus; 22 GB free disk; GPU over 4 GB VRAM or CPU with 16 GB RAM and 4 cores
  • Not on Android, iOS or non Plus ChromeOS
  • Model removed if free space drops below 10 GB
  • Not available in Web Workers; cross origin iframes need allow="language-model"
  • Output can be constrained to a regex or JSON schema

The story

What it is

A page can talk to a small AI chat model built into Chrome, running on your own computer.

For you

A site can offer an AI helper that works without sending your words to a server. You may wait for a model download the first time. It starts after you click or tap.

For makers

Makers get a free, private AI that works offline and costs no cloud fees. It lets them build smart features at scale. The model is small, so results are simpler than big cloud AI.

Where you see it

TypeExampleApps
gamesA browser role play game uses the local model to make non player characters talk back, with no server bill per player.None named
productivityA web notes app answers questions about your own notes, with the notes never leaving your device.Notion
educationA study site quizzes a student on their own text offline on a school laptop.None named
messagingA chat app suggests replies from the conversation on device.None named
shoppingA store assistant helps pick a product from specs in the page, with no external AI service.None named
creativeA web design tool suggests names and text for a layout on the device.Figma
accessibilityA page explains hard terms in simpler words for a reader, with nothing sent out.None named
developerA developer builds a form that extracts details from free text on the device.None named

Risks

  • Large download
  • Simple answers, can be wrong

What the platform says

  • Google Chrome: Prompt API. Lets web pages send prompts to Gemini Nano in Chrome, so AI features run locally, privately and offline.

Good uses and abuse

Legitimate uses

  • Local summarisation
  • Smart replies
  • Offline helpers

Known abuse

  • Prompt fingerprinting by availability state
  • Heavy downloads

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction2 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2024, Chrome 138: Prompt API stable for extensions
  • 2025, Edge 138: Edge behind a flag
  • 2026-05, Chrome 148: Prompt API stable on the web (per BCD; page text inconsistent)

Sources

How well checked: Checked against real behavior.

On this page