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:
- Developers pay API costs and deal with rate limits
- Users have no control over which models process their data
- Each app requires separate configuration
How It Works
- User configures once - Set up API keys and model preferences in the extension
- Apps request permission - Web apps use the injected
window.ailibrary to send prompts - User maintains control - Full visibility into what data is processed and when
Supported Models
- OpenAI: GPT-3.5, GPT-4, and variants
- Google: PaLM 2 (Chat and Code)
- Anthropic: Claude models
- Together: GPT NeoXT 20B
- Cohere: Xlarge
- Local: Open-source models via HTTP server (MPT, Dolly, etc.)
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:
- No API costs or rate-limiting headaches
- Single integration supports multiple providers
- Users bring their own models
For users:
- Control which AI services see your data
- Use external, proxied, or locally-hosted models
- Track prompt history across apps
For model providers:
- Reach users without requiring app-by-app integrations
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
- Available on Chrome and Brave
- Firefox, Edge, Safari in development
- 961 GitHub stars, active Discord community
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.