Remix.run Logo
The Prompt API(developer.chrome.com)
147 points by gslin 9 hours ago | 71 comments
haberman 7 hours ago | parent | next [-]

This API seems perfect for an idea I've had for a while: a de-snarkifier for social media.

Social media can be intellectually stimulating and educational, but it's also easy to get sucked into ideological sniping and flamewars, even if you didn't go looking for it. The emotional and intellectual energy spent flaming strangers on the Internet is a complete waste of human capital.

With an API like this, I assume you could have a browser extension that could de-snarkify content before showing it to you. You could ask the LLM to preserve all factual content from the post, but to de-claw any aggressive or snarky language. If you really wanted to have fun, you could ask it to turn anything written in an aggressive tone into something that sounds absurd or incompetent, so that the more aggressive the post, the more it would make the author look silly.

This could have a double benefit. For the reader, it insulates them from the personal attacks of random strangers on the Internet. Don't get me wrong, there is a time and a place for real, charged arguments about important issues that affect us all. But there is little to be gained from having those fights with strangers; on the contrary, I think it poisons the body politic when strangers are screaming at each other.

For the writer, it takes away any incentive to be snarky or rude. If other people filter their content this way, there's no point in trying to be mean to them, and no "race to the bottom" for who can be more nasty.

nsilvestri 6 hours ago | parent | next [-]

This is the Soylent of written communication. Full nutritional value with an unremarkable flavor.

haberman 5 hours ago | parent | next [-]

That is unironically exactly what I want from social media.

I want the option to engage with the substance of new developments in the world, technology, etc. without the drama. I don't want to be drawn into the drama of strangers (who could, for all I know, just be bots or ragebaiting AIs).

If I want drama, there's plenty of it on TV, or I could talk to my friends about what is going on with people I actually know.

The anti-pattern, in my mind, is logging on to engage with substantive content and to be inadvertently drawn into flamewars with strangers.

jychang 5 hours ago | parent | prev [-]

Are humans supposed to enjoy the "flavor" of diarrhea, as the result of giving every village idiot a microphone so they can spew shit from their mouths?

Sure, you might say this sort of thing is boiling flavor out of your food, but... boiling the bacteria out of what you consume isn't a bad thing.

samrus 5 hours ago | parent [-]

This is sanding the edges of off life. Its gonna make you soft

oarsinsync 2 hours ago | parent | next [-]

There's more to life than the Internet, social media, and anonymous trolls. This is sanding the edges off the Internet. It's gonna make you happier.

wewtyflakes 5 hours ago | parent | prev [-]

Sign me up

encrux 5 hours ago | parent | prev | next [-]

For YouTube, this already exists and I‘m using it. The extension is caller DeArrow and aims to reduce sensationalism via crowdsourcing, though I wouldn’t be surprised if top contributors are bots using LLMs.

sebzim4500 7 minutes ago | parent | next [-]

For people like me had tried it in the past and found it annoying, note that it now has a 'casual' mode where it only changes the truly useless titles and leaves reasonable ones alone.

niek_pas an hour ago | parent | prev [-]

Man, that before-after slider on the home page makes me so sad... YouTube used to just be random people sharing cool stuff, and those de-sensationalized titles really brought me back to that time for a second! Cool stuff.

netcan 6 hours ago | parent | prev | next [-]

I think it's an interesting idea to explore.

But... It's the type of idea that is unpredictable as it comes into contact with reality. If it works, it probably works very differently from the initial idea of how it will work.

haberman 5 hours ago | parent | next [-]

I 100% agree with this. I am certain that I cannot foresee how this would play out in reality.

jychang 5 hours ago | parent | prev [-]

Yeah, I 100% agree with the caution in this comment.

I see the merit in such a proposal. It's the linguistic equivalent to boiling the food you consume, instead of eating it raw with all the associated bad stuff.

The problem is, as you said, that this plan is unlikely to be as rosy as it's portrayed and probably has a lot of drawbacks in real life.

Interesting to think about and explore, though.

netcan 5 hours ago | parent [-]

I wasn't even talking about drawbacks, though that applies too.

I mean... you would be basically taking a complex thing, transforming and reconstructing it. What we want out of social media isn't a simple, legible function. The positives. You'd have to discover them.

If someone starts building with the intitial idea above, my guess is that they'd end up with some sort of custom feed that draws inspiration and inputs from social media... but isn't social media. It's something else that you can scroll, read and whatnot.

dotancohen 6 hours ago | parent | prev | next [-]

Though I hate the idea of this, I can see it becoming popular in some use cases, such as schools with "safe places".

jurgenburgen 6 hours ago | parent | prev | next [-]

On the other hand it would make all comments sound the same and further dilute internet content into average slop.

sidkhanooja 6 hours ago | parent [-]

on reflection, i would appreciate average slop more than the occasional heinous slop people say when they are opinionated..

dotancohen 6 hours ago | parent [-]

My opinion is based on what I see people upvoting on the internet you insensitive clod!

altmanaltman 5 hours ago | parent | prev [-]

Don't you think its better to just curate your social media and follow communities where the default is not toxicity? This is basically a distortion layer for reality and will just encourage more echo chambers.

Also what is toxic to one person is not toxic to another depending on their subjective choices. How will you solve for this without everyone just seeing what they want to see even if reality is not like that? I feel that will just enhance the problems of social media than reduce it.

It kind of falls apart when you start to think of edge cases rather than "hey this tool will keep morons off my feed!" mentality

meander_water 2 hours ago | parent | prev | next [-]

This looks like it uses Gemini Nano under the hood. But the latest Gemma4 E2B and E4B models appear to be much better, so you'd probably be better off deploying quantized versions through an extension for now.

- Gemini Nano-1: 46% MMLU, 1.8B

- Gemini Nano-2: 56% MMLU, 3.25B

- Gemma4 E2B: 60.0% MMLU, 2.3B

- Gemma4 E4B: 69.4% MMLU, 4.5B

Sources:

- https://huggingface.co/google/gemma-4-E2B-it

- https://android-developers.googleblog.com/2024/10/gemini-nan...

domenicd 2 hours ago | parent [-]

I no longer have any inside knowledge, but from my time on this team they were very quick about getting the latest small (Google) models into Chrome. I expect that if Gemma 4 (or its equivalent Gemini Nano) isn't already in Chrome, then it will be soon.

Note that the article here was last updated 2025-09-21, and as of that time it was already on Gemini Nano 3.

meander_water 2 hours ago | parent [-]

Thanks for the insider info! Do you know if there are any published benchmarks for Nano 3?

domenicd 4 hours ago | parent | prev | next [-]

I led the design effort on this API, before retiring. Here's my writeup on some of the considerations that went into it: https://domenic.me/builtin-ai-api-design/

comboy 3 hours ago | parent [-]

How do you envision short term and long term target usage of it?

And do you guys communicate between other browsers when doing something like this to try to settle on something common? I don't mean W3C but practically, it's a small world after all.

domenicd 2 hours ago | parent [-]

I can't speak for "you guys" anymore, as I'm retired, but from my personal perspective/recollection:

The target usage for the prompt API is anything that would benefit from the general capabilities of a language model, and can't be encompassed by the more-specific APIs for summarization/writing/rewriting. Realistic use cases currently are things like sentiment analysis, keyword extraction, etc. I have a number of ideas on how to integrate it into my current retirement project around Japanese flashcards, e.g. generating example sentences. If the small (~10 GiB) model class keeps getting smarter, the class of things possible on-device in this way gets larger and larger over time.

We definitely communicated with other browsers. There were the standing WebML Community Group meetings at the W3C every few weeks. There were async discussions like https://github.com/mozilla/standards-positions/issues/1213 and https://github.com/WebKit/standards-positions/issues/495 . (Side note, I love the contrast between Mozilla's helpful in-depth feedback and WebKit's... less helpful feedback.) There was also a bit of a debacle where the W3C Technical Architecture Group tried to give "feedback" but the feedback ended up being AI-generated slop... https://github.com/w3ctag/design-reviews/issues/1093 .

But overall, yeah, the goal with the prompt API, as with all web APIs, is to put something out there for discussion as early as possible, and get input from the broad community, especially including other browsers, to see if it's something that they are interested in collaborating on. https://www.chromium.org/blink/guidelines/web-platform-chang... (which I also wrote) goes into how the Chromium project thinks about such collaboration in general.

avaer 8 hours ago | parent | prev | next [-]

It works, I've shipped this as a "local inference"/poor person's ollama for low-end llm tasks like search. The main win is that it's free and privacy preserving, and (mostly) transparent to users in that they don't have to do anything, which is great for giving non-technical users local inference without making them do scary native things.

But keep in mind the actual experience for users is not great; the model download is orders of magnitude greater than downloading the browser itself, and something that needs to happen before you get your first token back. That's unfixable until operating systems start reliably shipping their own prebaked models that an API like this could plug into.

zozbot234 an hour ago | parent | next [-]

> But keep in mind the actual experience for users is not great; the model download is orders of magnitude greater than downloading the browser itself, and something that needs to happen before you get your first token back.

With MoE models, you could fetch expert layers from the network on demand by issuing HTTP range queries for the corresponding offset, similar to how bittorrent downloads file chunks from multiple hosts. You'd still have to download shared layers, but time to first token would now be proportional to active-size rather than total-size. Of course this wouldn't be totally "offline" inference anymore, but for a web browser feature that's not a key consideration.

NitpickLawyer an hour ago | parent [-]

> With MoE models, you could fetch expert layers from the network on demand

This is a common misconception, probably due to the unfortunate naming. Expert layers are not "expert" at any particular subject, and active-size only refers to the activated layers per token. You'd still need all (or most of all) the layers for any particular query, even if some layers have a very low chance of being activated.

All in all, you'd be better off with lazy loading the entire model, at least you'd know you have the capability to run inference from then on.

zozbot234 an hour ago | parent [-]

Ultimately it would amount to lazy-loading the model, but the parameters themselves would be fetched from the network as needed, which still decreases time-to-first-token. It's true that "expert" choices will span most of the model, regardless of any particular "subject" or "topic" choice, but if we simply care about time-to-first-token it's still a viable strategy.

Yokohiii 8 hours ago | parent | prev | next [-]

> That's unfixable until operating systems start reliably shipping their own prebaked models that an API like this could plug into.

Maybe the next big thing will be some software subscription premium offers with a bunch of 5090s as an extra.

paganel 3 hours ago | parent | prev | next [-]

> operating systems start reliably shipping their own prebaked models

Here's to hoping that that dystopia will never happen.

subhobroto 7 hours ago | parent | prev [-]

> It works, I've shipped this as a "local inference"/poor person's ollama for low-end llm tasks like search

fantastic!

> the model download is orders of magnitude greater than downloading the browser itself, and something that needs to happen before you get your first token back

sure but does this mean the model is lazily downloaded? that is, if I used this and I am the first time the model was called, the user would be waiting until the model was downloaded at that point?

that sounds like a horrible user experience - maybe chrome reduces the confusion by showing a download dialog status or similar?

also, any idea what the on disk impact is?

avaer 6 hours ago | parent | next [-]

The model download is lazy and cached, so it's a one-time cost presumably across all origins (I assume so since the alternative would be a trivial DoS waiting to happen).

So it's once per browser, not once per site.

You can track the download state yourself and pop whatever UI you want.

tastroder 6 hours ago | parent | prev | next [-]

chrome://on-device-internals reports "Model Name: v3Nano Version: 2025.06.30.1229 Folder size: 4,072.13 MiB" on a random Windows machine I just checked.

subhobroto 4 hours ago | parent [-]

Thank You stranger! I would have assumed the size would vary based on whether your hardware supports the high-quality GPU backend (4 GB) or defaults to a smaller CPU-compatible version (3 GB) but the 22GB note on that page is really confusing. Even if it was including the model server where's the remaining 18GB going towards?

danpalmer 3 hours ago | parent [-]

I'd imagine that the 22GB was decided through modelling various scenarios. For a start, it's not just a 4GB current model, it's 2x4GB to be able to update it without needing time when the computer is without a model, that's up to 8GB.

Then it's possible the model you get will scale with the CPU/GPU/RAM available, so if you have a 12GB GPU you probably get a better model, perhaps that's a 10-11GB model? At 2x that's 22GB.

Then consider that a machine is not static, GPUs/hardware come and go, VRAM allocation in integrated graphics changes, etc. You end up with just needing to pick a number and not confuse users.

domenicd 2 hours ago | parent [-]

(Former Chrome built-in AI team member here.)

This is part of it, and also we just didn't want to use up the last of the user's disk space! It's disrespectful to use up 3 GB if the user only has 4 GB left; it's sketchy if the user only has 10 GB. At 22 GB, we felt there was more room to breathe.

One could argue that users should have more agency and transparency into these decisions, and for power users I agree... some kind of neato model management UI in chrome://settings would have been cool. But 99% of users would never see that, so I don't think it ever got built.

why_is_it_good 7 hours ago | parent | prev | next [-]

> Storage: At least 22 GB of free space on the volume that contains your Chrome profile.

dotancohen 5 hours ago | parent | next [-]

Yes, but that is then followed by:

  > Built-in models should be significantly smaller. The exact size may vary slightly with updates.
taejavu 7 hours ago | parent | prev | next [-]

Lmao and here I am still staunchly treating Blazor’s 2MB runtime as a deal-breaker

qingcharles 5 hours ago | parent | next [-]

If it doesn't fit on a floppy...!

dotancohen 6 hours ago | parent | prev [-]

Emacs had long ago exceeded eight megs!

subhobroto 6 hours ago | parent | prev [-]

> `> Storage: At least 22 GB of free space on the volume that contains your Chrome profile.`

Yes, I can read and comprehend English and you should assume I read the page. Because of the "At least" wording, I was curious what a person who has actually used the feature has noticed, aka, learning from people who have actually done it already.

jfoster 4 hours ago | parent | prev [-]

Doesn't sound great, but consider how much better this is than every webpage trying to load their own models.

If it turns out useful enough I'm sure browsers will just start including it as (perhaps optional?) part of installation.

rock_artist 6 hours ago | parent | prev | next [-]

I think it's a step into a future of proper Model API. But it's just a small step. It reminds me of Apple's Foundation Models [1]

While many AI integrations are focused on text communication / chat style. A lot of software benefits from non-text interfaces.

I believe at some point OSes and browsers should provide an API to manage models so you'll have access to on-device/remote ones with a simplified interface for the app. Making something standardized that is cross-platform would be fantastic. It also needs to be on mobile devices, so the players that can easily make it happen are mostly Apple and Google. (Meta will follow or vice-versa I guess)

Key-point: it shouldn't be exclusive to promoted models.

(1) https://developer.apple.com/documentation/foundationmodels So the app would be able to query and get the right model(s).

jameslk 8 hours ago | parent | prev | next [-]

Seems like a good way for a rogue JS script to offload token generation to a bunch of unsuspecting visitors

It would actually be pretty interesting to see if its possible to decentralize the compute to generate something useful from a larger prompt broken down and sent to a bunch of browsers using a subagent pattern or something like RLM, each working on a smaller part of the prompt

varun_ch 7 hours ago | parent [-]

This feels like a lot of work for low reward, the technical/business infrastructure would be wild. And if anyone wants to offload their prompts to users browsers, they might as well just use the Chrome API correctly? How many server side prompts would realistically be useful to offload to a low end model like this?

Plus even if you really wanted to do that, WebGPU exists and has for a while right?

dnnddidiej 4 hours ago | parent | next [-]

Nefarous use cases. Run that on some suckers machine.

Edit: simple example is a spam bot

dotancohen 5 hours ago | parent | prev | next [-]

  > This feels like a lot of work for low reward
Low per-device reward combined with a high user count - either by large legitimate players or by botnets - has been the monetisation strategy of most online enterprises.
jameslk 7 hours ago | parent | prev [-]

> How many server side prompts would realistically be useful to offload to a low end model like this?

There's a lot of ways this API could go, e.g. more powerful models eventually, or perhaps integration with cloud models. For example, I could see Google trying to default Gemini as the model for users signed into Chrome

varun_ch 7 hours ago | parent [-]

I think we’ll get more powerful models when they become reasonable to run on regular people’s computers, in which case the compute costs would hopefully fall enough that people don’t need to resort to this kind of weird stuff.

As for cloud models, that would be interesting, although I guess then the fraud would be easier in spoofing whatever parameters (ip address? domain name? some Chrome install identifier?) to get around whatever rate limiting they come up with, rather than actually using people’s computers.

Anyways I’m sure if it ends up being abused, they can throw a permissions dialog in front of it. Just need to figure out a way to make normal people understand.

dotancohen 5 hours ago | parent [-]

  > Just need to figure out a way to make normal people understand.
Has that strategy ever actually worked?
mudkipdev 2 hours ago | parent | prev | next [-]

Gemini Nano, unlike Gemma, is not open-weight, right? I would be interested in dumping the model weights, unless someone has done that already

afshinmeh 6 hours ago | parent | prev | next [-]

https://github.com/mozilla/standards-positions/issues/1067

kurtoid 3 hours ago | parent [-]

See also: https://github.com/mozilla/standards-positions/issues/1213

benjaminbenben 2 hours ago | parent | prev | next [-]

We use this for summarising our hack day write ups: https://remotehack.space/previous-hacks/

It's a tiny script that looks up the rss feed and uses the content to generate summaries; quite a nice fit with our static site. Sometime I'd like to extend it to ask different questions about the content.

me551ah 2 hours ago | parent | prev | next [-]

I’m just wondering how much more RAM and VRAM chrome will use after these changes

gopalv 5 hours ago | parent | prev | next [-]

The better part of this is having a local-first AI, particularly because it has tool-calling builtin & structured output.

I haven't pushed out a full version[1] which uses ducklake-wasm + this to make a completely local SQL answering machine, but for now all it does is retype prompts in the browser.

[1] - https://notmysock.org/code/voice-gemini-prompt.html

nl 8 hours ago | parent | prev | next [-]

The model this uses is useless for anything beyond 2 round chat at the most.

If you want to do anything interesting you need transformers.js and a decent mode. Qwen 0.9B is where things start working usefully

izietto 3 hours ago | parent | prev | next [-]

Can pass to it the current page contents for a AI-based AdBlock / cookie manager / etc.?

skybrian 8 hours ago | parent | prev | next [-]

Still in origin trial? Looks like they're adding a temperature parameter:

https://chromestatus.com/feature/6325545693478912

Ronsenshi 2 hours ago | parent | prev | next [-]

Not long before all of the web content will be going through these AI pipelines where user might not even see original webpage.

fg137 8 hours ago | parent | prev | next [-]

"sorry, to use our website, you must have at least 22 GB of free disk space."

cdrini 6 hours ago | parent [-]

True, but arguably better than "sorry, to use our website, you must have a ChatGPT subscription."

fg137 an hour ago | parent | next [-]

More like "you need to sign up for our website and pay for a subscription", and I'd much rather do that if it's actually providing value. I am absolutely not going to run model locally which slowly churns out words at 5 tps while making the computer hot to touch.

_pdp_ 6 hours ago | parent | prev | next [-]

that is ~9% of the total available disk space for baseline phones and laptops for a model that is not that useful.

jfoster 4 hours ago | parent | prev [-]

Also much better than every website wanting its own 22 GB rather than the 22 GB being a shared resource.

fg137 an hour ago | parent [-]

I would very much like not to have to download 22 GB for some inference capability that is way worse than API calls both in terms of quality and speed.

I would rather pay money than seeing this thing running in my browser that only prints 5 tps on high-end consumer hardware.

tethys 4 hours ago | parent | prev | next [-]

Slightly off-topic: Refreshing to see these two authors link to their Bluesky and Mastodon profiles. No Twitter/X in sight!

gorgoiler 7 hours ago | parent | prev | next [-]

Imagine a Vendor API that adds a way to link from the page straight into a device purchase workflow. As a trial of the API in Chrome you can order a new Google Pixel 9b directly from any page with the word Android in it!

Or a LocalNet API that integrates with trusted hardware devices on your local network. As a trial (Chrome beta programme — strictly limited but here’s 3x signup links to share with your friends) you can adjust your Google Next Mini underfloor heating directly from Chrome!

Or a DirectCast API that lets you stream <video> elements to a device of your choice even over a VPN. As a Chrome trial, you can use your Google Cloud account to stream directly from YouTube Premium to any linked Google Chromecast devices you own!

danny_codes 7 hours ago | parent | prev [-]

Domain names are a nice candidate for a Georgian tax