@built-in-ai
@built-in-ai/core

Installation

Setup @built-in-ai/core for AI SDK v6

Package Installation

npm i @built-in-ai/core

Version Compatibility

@built-in-ai/coreAI SDKNotes
v3.0.0 and abovev6.xCurrent stable for AI SDK v6
v2.1.0 and belowv5.xUse for AI SDK v5

For AI SDK v5, please refer to the v5 documentation.

Chrome Setup

  1. Use Chrome version 128 or higher
  2. Navigate to chrome://flags/
  3. Search for "Prompt API for Gemini Nano with Multimodal Input"
  4. Set it to Enabled
  5. Go to chrome://components
  6. Click Check for Update on Optimization Guide On Device Model
  7. Restart Chrome

Edge Setup

  1. Use Edge Dev/Canary version 138.0.3309.2 or higher
  2. Navigate to edge://flags/#prompt-api-for-phi-mini
  3. Set it to Enabled
  4. Restart Edge

For more information, check out Chrome's official guide.

Verifying Installation

After installation, you can verify browser support:

import { doesBrowserSupportBuiltInAI } from "@built-in-ai/core";

if (doesBrowserSupportBuiltInAI()) {
  console.log("Browser supports built-in AI!");
} else {
  console.log("Built-in AI not available, use server fallback");
}

On this page