← back

window.ai: User-Controlled AI Models in the Browser

Dec 8, 2025

aibrowser-extensionllmprivacydeveloper-tools

window.ai is a browser extension that lets users configure AI models in one place and use them across any compatible web application. Instead of each app managing its own API keys and model choices, users control everything centrally.

The Problem

Every AI-powered web app currently handles its own model integration:

How It Works

  1. User configures once - Set up API keys and model preferences in the extension
  2. Apps request permission - Web apps use the injected window.ai library to send prompts
  3. User maintains control - Full visibility into what data is processed and when

Supported Models

Developer Integration

Simple async API:

const [response] = await window.ai.generateText({
  messages: [{ role: "user", content: "Your prompt" }]
})

Supports streaming, multiple completions, temperature, token limits, and stop sequences.

Benefits

For developers:

For users:

For model providers:

Local Model Support

Run open-source models locally via any HTTP server that exposes a /completions endpoint conforming to the window.ai spec. Accept prompts or ChatML-formatted messages, return generated text.

Current Status

The Pattern

This is part of a broader shift toward user-controlled AI infrastructure. Rather than apps owning the AI relationship, users configure once and carry their preferences everywhere. Similar to how password managers centralized credential management.

Source: github.com/alexanderatallah/window.ai