Chrome is experimenting with adding built-in AI directly to the browser, allowing websites and web applications to perform AI-powered tasks without needing to deploy or manage their own AI models. Please follow the steps below to use Chrome’s built-in AI:
- Install Chrome Canary: Ensure you have version v128.0.6545.0 or newer.
- Enable Optimization Guide: Open
chrome://flags/#optimization-guide-on-device-model
, set it to "Enabled BypassPerfRequirement". - Enable Prompt API: Open
chrome://flags/#prompt-api-for-gemini-nano
, set it to "Enabled". - Relaunch Chrome.
- Open DevTools and send
await ai.languageModel.capabilities().available;
in the console. If this returns “readily,” then you are all set. - If it fails, force Chrome to recognize that you want to use this API. To do so, open DevTools and send
await ai.languageModel.create();
in the console. This will likely fail, but it’s intended. - Relaunch Chrome.
- Open a new tab in Chrome, go to
chrome://components
. - Confirm that Gemini Nano is either available or is being downloaded. You'll want to see the Optimization Guide On Device Model present with a version greater or equal to 2024.5.21.1031. If there is no version listed, click on "Check for update" to force the download.
- Once the model has downloaded and has reached a version greater than shown above, open DevTools and send
await ai.languageModel.capabilities().available;
in the console. If this returns “readily,” then you are all set.