<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-i-built-an-app-with-it-in-27-lines--efabih3ye" -->

---
title: Google Gave Every Chrome a Free AI Model — and a...
description: Chrome 148 ships Gemini Nano built into the browser with a public Prompt API accessible from any web page, no API key, account, origin-trial token, server, or...
canonical: https://daily.dev/posts/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-i-built-an-app-with-it-in-27-lines--efabih3ye
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Google Gave Every Chrome a Free AI Model — and a JavaScript API. I Built an App With It in 27 Lines. | daily.dev
og:description: Chrome 148 ships Gemini Nano built into the browser with a public Prompt API accessible from any web page, no API key, account, origin-trial token, server, or...
og:url: https://daily.dev/posts/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-i-built-an-app-with-it-in-27-lines--efabih3ye
og:image: https://api.daily.dev/og/posts/EFaBIh3ye.png
og:image:alt: Google Gave Every Chrome a Free AI Model — and a JavaScript API. I Built an App With It in 27 Lines.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Gave Every Chrome a Free AI Model — and a JavaScript API. I Built an App With It in 27 Lines.

**[Noor Mohammad](https://daily.dev/sources/ew9hy5zthevyyefagop4g)** · [@noormohammad](https://daily.dev/noormohammad) · 1 min read · 0 upvotes · 1 comments

## Summary

Chrome 148 ships Gemini Nano built into the browser with a public Prompt API accessible from any web page, no API key, account, origin-trial token, server, or per-token billing required, and not gated behind a flag. The model runs entirely on-device, continuing to respond even with DevTools set to Offline. A short demo app of 27 lines is shown along with setup errors encountered and four hard limits developers should expect to hit quickly.

## Content

The Mac "hidden AI model" story went everywhere. The bigger version happened in the browser — on ~3 billion machines.

Since **Chrome 148**, any page can call **Gemini Nano** through the public Prompt API: no key, no account, no origin-trial token, no build step, no server, no per-token bill. Not behind a flag.

Real framing: **the web platform now includes a language model the way it includes a camera API or geolocation.** My 27-line test page kept answering with DevTools set to Offline.

Includes the full working page (not a fragment), measured timings, every setup error hit, and the 4 hard limits you'll meet by lunchtime. Video version too. 🔗
[https://medium.com/@thebuildersplaybook/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-37c185282f04](https://medium.com/@thebuildersplaybook/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-37c185282f04)

## Community discussion

Top comments from developers on daily.dev.

**@noormohammad** · 0 upvotes

> Two things worth arguing about: (1) availability gating — the model download and hardware eligibility mean you need a real fallback path, so this isn't a drop-in replacement for a server call; (2) the offline behaviour is the genuinely interesting bit for PWAs and privacy-sensitive forms.
>
> Anyone shipped anything to production on the Prompt API yet? Curious what your fallback strategy looks like for non-eligible clients.
>
> 🎥 Video walkthrough: [https://youtu.be/a08hMKfVG5s?si=KaL-gWZXnyia8dHb](https://youtu.be/a08hMKfVG5s?si=KaL-gWZXnyia8dHb)

## Similar posts on daily.dev

- [Getting Started with Chrome's window.ai Prompt API](https://daily.dev/posts/getting-started-with-chrome-s-window-ai-prompt-api-v9xmcyyfi) · SitePoint · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#google-chrome](https://daily.dev/tags/google-chrome), [#local-ai](https://daily.dev/tags/local-ai)

[View this post on daily.dev](https://daily.dev/posts/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-i-built-an-app-with-it-in-27-lines--efabih3ye)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-i-built-an-app-with-it-in-27-lines--efabih3ye","headline":"Google Gave Every Chrome a Free AI Model — and a JavaScript API. I Built an App With It in 27 Lines.","text":"Chrome 148 ships Gemini Nano built into the browser with a public Prompt API accessible from any web page, no API key, account, origin-trial token, server, or per-token billing required, and not gated behind a flag. The model runs entirely on-device, continuing to respond even with DevTools set to Offline. A short demo app of 27 lines is shown along with setup errors encountered and four hard limits developers should expect to hit quickly.","url":"https://daily.dev/posts/google-gave-every-chrome-a-free-ai-model-and-a-javascript-api-i-built-an-app-with-it-in-27-lines--efabih3ye","datePublished":"2026-08-31T12:08:37.836Z","dateModified":"2026-08-31T12:08:54.181Z","author":{"@type":"Person","name":"Noor Mohammad","url":"https://daily.dev/noormohammad","image":"https://media.daily.dev/image/upload/s--3w4n0n-6--/f_auto/v1754054115/avatars/avatar_eW9hy5zTHEVyYeFaGOP4G?_a=BAMClqZW0","description":"Software Engineer | React, Next.js & scalable web apps | Writing on AI, blockchain & emerging tech","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":120}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"comment":[{"@type":"Comment","text":"Two things worth arguing about: (1) availability gating — the model download and hardware eligibility mean you need a real fallback path, so this isn’t a drop-in replacement for a server call; (2) the offline behaviour is the genuinely interesting bit for PWAs and privacy-sensitive forms.\nAnyone shipped anything to production on the Prompt API yet? Curious what your fallback strategy looks like for non-eligible clients.\n🎥 Video walkthrough: https://youtu.be/a08hMKfVG5s?si=KaL-gWZXnyia8dHb","datePublished":"2026-08-31T12:08:47.634Z","url":"https://daily.dev/posts/EFaBIh3ye#c-QhGO9kDOA","author":{"@type":"Person","name":"Noor Mohammad","url":"https://daily.dev/noormohammad","image":"https://media.daily.dev/image/upload/s--3w4n0n-6--/f_auto/v1754054115/avatars/avatar_eW9hy5zTHEVyYeFaGOP4G?_a=BAMClqZW0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/ew9hy5zthevyyefagop4g","name":"Noor Mohammad"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Noor Mohammad","item":"https://daily.dev/sources/ew9hy5zthevyyefagop4g"},{"@type":"ListItem","position":3,"name":"Google Gave Every Chrome a Free AI Model — and a JavaScript API. I Built an App With It in 27 Lines."}]}
```

