Between NVDA stock hovering around its all-time highs and Apple’s steady hardware gains for local inference, one question looms: when will web browsers add a native JavaScript API for large language models, such as a window.ai interface?
Such an API would reduce the reliance (and costs) on third-party cloud services like OpenAI’s, while unlocking a wide range of local use cases. For many applications, open models running directly on user devices are already “good enough”. The missing piece is a standardized way for the browser to expose these capabilities and manage models, just as it does today for graphics (WebGL), storage (IndexedDB), or USB (WebUSB).
Once that arrives, the balance between cloud AI and local AI could shift quickly, and the economics of how we use LLMs on the web may change just as dramatically. That moment feels imminent.
The Opera browser is already adding LLM support to its native AI assistant (Aria), but there is no exposed JavaScript API, at least not yet.

