Get started with built-in AI  |  AI on Chrome  |  Chrome for Developers


This article provides a guide on using Chrome's built-in AI features, including requirements, setup, troubleshooting, and the standardization process.
AI Summary available — skim the key points instantly. Show AI Generated Summary
Show AI Generated Summary
Get started with built-in AI

Stay organized with collections Save and categorize content based on your preferences.

Published: December 12, 2024

With built-in AI, your web application can perform AI-powered tasks without needing to deploy or manage its own AI models. The Chrome AI team is developing task-specific web platform APIs and browser features that integrate AI models in your browser. We aim for these APIs to work when implemented in the browser, on a user's device.

Requirements

At this time, you can only use these APIs in Chrome, but we aim to standardize them across browsers.

Models

The Prompt API, Summarizer API, Writer API, and Rewriter API download Gemini Nano, which is designed to run locally on desktop and laptop computers. These APIs don't work on mobile devices.

As of now, these APIs only support text-to-text modality.

Hardware

The Language Detection and Translation APIs work on desktop and Android devices, in Chrome.

The Prompt API, Summarizer API, Writer API, and Rewriter API work in Chrome when the following conditions are met:

  • Operating system: Windows 10 or 11; macOS 13+ (Ventura and onwards); or Linux. Chrome for Android, iOS, and ChromeOS are not yet supported by our APIs backed by Gemini Nano.
  • Storage: At least 22 GB on the volume that contains your Chrome profile.
Note: While the model requires far less storage (around a couple of GB), this requirement exists to ensure you have an ample storage margin. If the available storage space falls to less than 10 GB after the download, the model will be removed from your device.
  • GPU: Strictly more than 4 GB of VRAM.
  • Network: Unlimited data or an unmetered connection.
Key Term: A metered connection is a data-limited internet connection. Wi-Fi and ethernet connections tend to be unmetered by default, while cellular connections are often metered.

These requirements exist for you in your development process and your users who work with the features you build.

Start building

There are several built-in AI APIs available at different stages of development. Some are available to all developers in origin trials, while others are only available to Early Preview Program participants.

Each API has its own set of instructions to get started and download the model, both for local prototyping and in production environments with the origin trials.

While the Prompt API is only available locally and in Chrome Extensions, the other APIs work for websites and Chrome Extensions.

Use APIs on localhost

All of the APIs are available on localhost in Chrome. Follow these steps to

  1. Go to chrome://flags/#prompt-api-for-gemini-nano.
  2. Select Enabled.
  3. Click Relaunch or restart Chrome.

To confirm Gemini Nano has downloaded and works as intended, open DevTools and type await ai.languageModel.availability(); into the console. This should return available.

Troubleshoot localhost

If Gemini Nano doesn't work as expect, follow these steps:

  1. Restart Chrome.
  2. Go to chrome://components.
  3. Confirm that Optimization Guide On Device Model is present. This means Gemini Nano is either available or downloading.
    • If there's no version number listed, click Check for update to force the download.
  4. Open DevTools and type ai.languageModel.availability(); into the console. This should return available.

If necessary, wait for some time and repeat these steps.

Standards process

We're working to standardize these APIs, so that they work across all browsers. This means we have proposed the APIs to the web platforms community, and moved them to the W3C Web Incubator Community Group for further discussion.

We are requesting feedback from the W3C, Mozilla, and WebKit for each API.

You can learn more about this process for each API in the corresponding documentation.

Engage and share feedback

If you try built-in AI and have feedback, we'd love to hear it.

🧠 Pro Tip

Skip the extension — just come straight here.

We’ve built a fast, permanent tool you can bookmark and use anytime.

Go To Paywall Unblock Tool
Sign up for a free account and get the following:
  • Save articles and sync them across your devices
  • Get a digest of the latest premium articles in your inbox twice a week, personalized to you (Coming soon).
  • Get access to our AI features

  • Save articles to reading lists
    and access them on any device
    If you found this app useful,
    Please consider supporting us.
    Thank you!

    Save articles to reading lists
    and access them on any device
    If you found this app useful,
    Please consider supporting us.
    Thank you!