📄️ Introduction
Chrome's built-in AI runs Gemini Nano on-device — no backend, no keys, nothing leaves the machine. Meet the API family and the one pattern they all share.
📄️ Setup & availability
Turn on Chrome's built-in AI, watch Gemini Nano download, and handle the four availability() states so your feature never assumes the model is already there.
📄️ Prompt API
Build an on-device chat with Chrome's Prompt API: create a LanguageModel session, set a system prompt, stream deltas, clone sessions, and manage the token budget.
📄️ Structured output & tools
Force Chrome built-in AI to return JSON with responseConstraint, then drive real JavaScript functions with the intent loop that makes tool calling work today.
📄️ Multimodal
Add image input to a Chrome LanguageModel session: opt in with expectedInputs, pass a Blob as a content part, and stream the on-device answer to any picture.
📄️ Summarizer
Summarize text on-device with Chrome's Summarizer API: pick key-points, TL;DR, headline, or teaser, steer with sharedContext, and stream long documents.
📄️ Translator + Detector
Detect a language with confidence scores, then translate between BCP-47 pairs on-device with Chrome's Translator and Language Detector — no server, no key.
📄️ Live voice translation
Build live voice translation in Chrome: transcribe with the Web Speech API, translate each sentence on-device with the Translator, and speak the result back.
📄️ Writer & Rewriter
Generate new text with Chrome's Writer API and reshape existing text with the Rewriter API — control tone, format, and length, and stream both on-device.
📄️ Proofreader
Proofread on-device with Chrome's Proofreader API: positioned grammar, spelling, and punctuation corrections you can render as inline diffs, no server.
📄️ Embeddings
Turn text into on-device vectors with Chrome's SemanticEmbedder: pick a taskType, compare with cosine similarity, and build semantic search with no backend.
📄️ WebMCP
WebMCP turns your page into a tool surface: register actions with document.modelContext.registerTool and drive them from an in-page LanguageModel agent.
📄️ Generative UI
Let a built-in AI tool return interactive UI, not text — render the markup in a sandboxed iframe, validate every postMessage, and keep ui:// from the model.
📄️ MCP client
Turn the browser into an MCP client — run the modern Streamable HTTP flow, list a remote server's tools, and let the on-device LanguageModel drive them.
📄️ Observability & tracing
Instrument on-device AI with no backend: a client-side tracer that captures latency, TTFT, context usage, and errors, then ships OpenTelemetry gen_ai.* spans.
📄️ Evaluation
Evaluate on-device AI you can't eyeball: build a golden set, score answers with deterministic checks, run each case many times, and report a stability rate.
📄️ Shipping & compatibility
Every built-in AI API mapped to its Chrome version, stability, and flag, plus feature-detection, fallback patterns, and the pre-ship checklist.