Chrome AI APIs: Experimental Features
Chrome now offers a set of experimental AI capabilities through built-in APIs. These features are cutting-edge and require specific configuration to enable. Below, you'll find an overview of each API and instructions on how to activate them.
Prompt API (Chat)
The Prompt API allows for interactive chat-like interactions with the AI model.
How to Enable:
- Enable Gemini Nano: Navigate to chrome://flags/#optimization-guide-on-device-model and enable "BypassPerfRequirement"
- Enable Prompt API: Navigate to chrome://flags/#prompt-api-for-gemini-nano and enable it
Verify availability in Chrome DevTools with: (await ai.languageModel.capabilities()).available;
AI Summarizer
The AI Summarizer API provides text summarization capabilities.
How to Enable:
- Enable Gemini Nano: Navigate to chrome://flags/#optimization-guide-on-device-model and enable "BypassPerfRequirement"
- Enable Summarization API: Navigate to chrome://flags/#summarization-api-for-gemini-nano and enable it
Confirm model setup in Chrome DevTools with: await ai.summarizer.capabilities();
Language Translation API
The Language Translation API offers translation capabilities between different languages.
How to Enable:
- Enable Language Detection API: Navigate to chrome://flags/#language-detection-api and enable it
- Enable Translation API: Navigate to chrome://flags/#translation-api and choose the appropriate option
Manage language packs at: chrome://on-device-translation-internals/
Writer and Rewriter API
The Writer and Rewriter APIs provide AI-assisted writing and text rewriting capabilities.
How to Enable:
- Enable Gemini Nano: Navigate to chrome://flags/#optimization-guide-on-device-model and set to "Enabled BypassPerfRequirement"
- Enable Writer API: Go to chrome://flags/#writer-api-for-gemini-nano and enable it
- Enable Rewriter API: Go to chrome://flags/#rewriter-api-for-gemini-nano and enable it
Confirm setup in Chrome DevTools with: (await ai.languageModel.capabilities()).available;
Try the APIs
Now that you've enabled the APIs, you can try them out in our demo application: