Experimental protocol preview

Web Inference Protocol

One browser API. User-selected providers. An open protocol under test.

Apps ask for AI. Users decide how it runs.

The protocol gives websites one consistent interface while the user controls the available provider and model. The preview API can still change as the implementation is tested.

Application
Protocol
Provider

How It Works

Apps request AI. The protocol delivers it.

A request, end to end

One interface separates application code from inference infrastructure.

navigator.llm
  1. @webinfer/client

    Client SDK

    A page calls one browser API for text, images, audio, speech, streaming, and tools.

  2. @webinfer/server

    Request coordinator

    Permissions, provider selection, fallback, storage, and usage tracking happen here.

  3. local, cloud, or federated

    Available provider

    The request reaches the best source for the task, preferences, and availability.

Streaming response: results return through the same path to the page.

Client

@webinfer/client

A lightweight SDK that auto-connects to available AI sources. Call generateText(), generateImage(), or generateSpeech().

  • Simple API for text, image, audio, and speech
  • Auto-connects to the user's AI sources
  • Handles streaming responses
  • Supports tool calls for data retrieval and UI

Server

@webinfer/server

The brain that handles requests. It routes to the best local or cloud provider based on task, preferences, and availability.

What it does

  • Manages provider connections and API keys
  • Routes requests and handles provider fallback
  • Stores user preferences and history

Where it runs

  • Browser extension
  • Local development daemon
  • Self-hosted gateway

One Client Across Supported Transports

Import the client, call a function, and connect through an available extension, daemon, or configured gateway transport.

Typed Client
Multiple Transports
25+ Registry Entries

Build AI Features in Minutes

Import @webinfer/client. It routes through an available configured transport; provider availability, credentials, permissions, and billing remain explicit.

import { generateText } from '@webinfer/client'

const result = await generateText({ prompt: 'Hello!' })

Want to move even faster? Try AI Blocks, pre-built React components for chat, speech, images, and more.

Where does inference happen?

Users connect their AI sources. The protocol routes each request to appropriate models and providers.

Someone browsing the web on Chrome desktop

Gemini Nano

Chrome's built-in AI. Free, on-device, private.

Local Models

Ollama, LM Studio, or other local runners.

Commercial APIs

OpenAI, Anthropic, Google—your own API keys.

WebInfer Cloud

One subscription, 200+ models.

Corporate Gateway

Company-provided AI. Paid by employer.

Courtesy Credits

Free credits from app developers. Rate-limited.

Private Server

Self-hosted gateway. Access from anywhere.

Casual User has access to 2 inference sources. The server automatically picks the best one for each request.

Run Anywhere

The server runs wherever you need it. Same protocol, different packaging.

Browser Extension

Chrome & Chromium

Load the preview extension and grant each site access before it can make requests.

  • MV3 preview
  • Per-origin permission
  • User-selected providers
Install Preview

Development Daemon

Local Node.js runtime

Run the repository daemon locally for development and browser integration testing.

  • Developer tooling
  • HTTP/SSE fixtures
  • Local configuration
Daemon Guide

Self-hosted Gateway

Your infrastructure

Deploy on your servers. Issue tokens, enforce quotas, monitor usage.

  • Access tokens
  • Usage quotas
  • Federation
Deploy Guide

25+ Providers, One API

Connect existing providers or discover new ones. Mix local with cloud. Switch without changing code.

Cloud APIs

Bring your own API keys

OpenAI
Anthropic
Google AI
Mistral
DeepSeek
Groq
Cohere
Azure

Local Runners

Run models on your hardware

Ollama
LM Studio
llama.cpp
Transformers.js

Browser-Native

On-device when the browser API is available and enabled

Chrome Gemini Nano

Gateways

Access multiple providers

OpenRouter
Portkey
Together AI
Fireworks

Browser AI When Available

Chrome's built-in Prompt API can run on-device. WebInfer can route to it when the browser exposes the API and the user has enabled it; Chrome controls model availability and runtime requirements.

Configurable Gateway Paths

Combine an extension, local daemon, and self-hosted gateways through explicit routing and fallback configuration.

Extension
Home Server
Self-hosted Gateway
AI Provider
Resilience
Configure a fallback gateway for an unavailable local path.
Cost Control
Set provider order and enforce gateway quotas at the endpoint.
Privacy
Choose local execution when requests must stay on your hardware.
Explicit Topology
Add only the transports and endpoints your deployment controls.

Server Discovery

Like MCP servers, a configured WebInfer server can expose a machine-readable discovery endpoint that advertises its capabilities.

Well-Known Endpoint

/.well-known/webinfer.json

Every server exposes its capabilities, models, and authentication methods in a machine-readable format.

  • Machine-readable format
  • Explicit server URL and credentials
  • Dynamic capability detection

Adding a Server

  1. Enter URL

    Paste a server URL to fetch its advertised capabilities.

  2. Authenticate

    Add your access token or API key if required.

  3. Ready

    Review the discovered models, then set provider priority.

Response Format
{
  "$schema": "webinfer.com/schemas/...",
  "version": "1.0",
  "protocol": "webinfer",
  "provider": {
    "id": "my-gateway",
    "name": "My Gateway",
    "type": "gateway"
  },
  "server": { "baseUrl": "..." },
  "config": {
    "fields": [
      { "key": "apiKey", "type": "password" }
    ]
  },
  "auth": { "methods": ["bearer"] },
  "capabilities": ["chat", "image"],
  "models": [{ "id": "gpt-4o" }],
  "federation": { "supported": true }
}

Inspired by Model Context Protocol (MCP) server discovery patterns.

What It Enables

A shared protocol boundary makes provider and runtime choices more portable across compatible applications.

Reuse provider configuration

Compatible applications can route through a provider or gateway the user has already configured.

Controllable data path

Local execution can keep a request on-device; remote execution sends it to the selected provider or gateway.

Optional app relay

Applications can use the extension or a user-selected endpoint without operating their own AI relay.

Provider freedom

Switch from OpenAI to Anthropic to local models without changing code. Your choice, not the app's.

Local execution options

Use Chrome's built-in AI when available, or configure local runtimes such as Ollama and LM Studio.

Stable application boundary

Applications can retain the WebInfer API while provider and runtime integrations are updated.

A different integration model

Compare a custom provider integration with the protocol approach.

ConcernCustom AI implementationWith the Protocol
API keysDeveloper manages every keySelected provider or gateway owns credentials
Provider choiceProvider locked by developerUser chooses their provider
Data pathData flows through app serversLocal, extension, or configured gateway path
CostDeveloper pays or passes on the costDepends on the selected runtime or provider
Coverage1-2 providers, hardcoded25+ registered provider integrations
Local modelsSeparate implementation requiredThe same API works locally

Questions

What stage is this project in?

Experimental preview. The core protocol and SDK request path is implemented, but APIs, packages, provider compatibility, and extension distribution may change.

How is this different from calling OpenAI directly?

Your application uses one WebInfer API while routing through an available local, extension, or gateway provider. The registry contains 25+ provider integrations, but availability and credentials remain provider-specific.

What about Chrome's built-in AI?

WebInfer integrates with Chrome's Gemini Nano when available. It provides a unified API whether AI runs locally or in the cloud.

Is my data private?

The data path depends on the selected runtime. Local execution can stay on-device; remote providers and gateways receive the request they execute. Applications should disclose and secure the path they enable.

Can I use this in production?

Evaluate it as an experimental preview. Pin versions, test the exact extension/provider path you deploy, and expect breaking changes before a stable release.

Try It Out

Install the extension to experience the protocol, or read the docs to integrate it into your app.