> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/n4ze3m/page-assist/llms.txt
> Use this file to discover all available pages before exploring further.

# Chrome AI (Gemini Nano)

> Use Google's built-in Gemini Nano model in Chrome

Chrome AI brings on-device AI capabilities directly into your browser using Google's Gemini Nano model. This experimental feature allows you to run AI inference entirely in the browser without external API calls.

## What is Chrome AI?

Chrome AI is Google's built-in AI feature that runs the Gemini Nano model directly in the Chrome browser. It offers:

* **Complete Privacy**: All inference happens locally in the browser
* **No API Costs**: No charges for usage
* **Fast Responses**: On-device processing
* **Offline Capability**: Works without internet (after model download)
* **Built-in Integration**: No separate installation needed

## Prerequisites

* **Chrome Canary** or **Chrome Dev** (version 128+)
* **Supported Operating System**: Windows, macOS, or Linux
* **Sufficient Storage**: \~2GB for the Gemini Nano model
* **Modern Hardware**: Recommended for optimal performance

## Availability Status

Chrome AI is currently an experimental feature. Check availability:

* **Readily Available**: Model is installed and ready
* **After Download**: Model needs to be downloaded first
* **Downloadable**: Feature is available but model not yet downloaded
* **Downloading**: Model download in progress
* **Unavailable**: Not supported on your system/browser version

## Setup Instructions

### Step 1: Install Chrome Canary

<Steps>
  <Step title="Download Chrome Canary">
    Visit [google.com/chrome/canary](https://www.google.com/chrome/canary/) and download Chrome Canary for your operating system.
  </Step>

  <Step title="Install and Launch">
    Install Chrome Canary and launch it (you can run it alongside regular Chrome).
  </Step>
</Steps>

### Step 2: Enable Chrome AI Flags

<Steps>
  <Step title="Open Flags Page">
    Navigate to:

    ```text theme={null}
    chrome://flags
    ```
  </Step>

  <Step title="Enable Required Flags">
    Search for and enable these flags:

    * **Prompt API for Gemini Nano**
      ```text theme={null}
      chrome://flags/#prompt-api-for-gemini-nano
      ```
      Set to: **Enabled**

    * **Optimization Guide On Device Model** (if available)
      ```text theme={null}
      chrome://flags/#optimization-guide-on-device-model
      ```
      Set to: **Enabled BypassPerfRequirement**
  </Step>

  <Step title="Relaunch Browser">
    Click "Relaunch" to restart Chrome Canary with the new settings.
  </Step>
</Steps>

### Step 3: Download Gemini Nano Model

<Steps>
  <Step title="Check Model Status">
    Open Chrome DevTools (F12) and run in the console:

    ```javascript theme={null}
    await ai.languageModel.availability()
    ```

    Possible responses:

    * `"readily"` - Model ready to use
    * `"after-download"` - Needs download
    * `"no"` - Not available
  </Step>

  <Step title="Trigger Download (if needed)">
    If the model needs to be downloaded, run:

    ```javascript theme={null}
    await ai.languageModel.create()
    ```

    This will initiate the model download (\~2GB).
  </Step>

  <Step title="Wait for Download">
    The download may take several minutes depending on your connection. You can check progress in:

    ```text theme={null}
    chrome://components
    ```

    Look for "Optimization Guide On Device Model" component.
  </Step>

  <Step title="Verify Installation">
    After download completes, verify the model is ready:

    ```javascript theme={null}
    const session = await ai.languageModel.create();
    const result = await session.prompt("Hello!");
    console.log(result);
    ```
  </Step>
</Steps>

### Step 4: Enable in Page Assist

<Steps>
  <Step title="Open Page Assist Settings">
    Click the Page Assist icon in Chrome Canary's toolbar, then click Settings.
  </Step>

  <Step title="Find Chrome AI Setting">
    Navigate to the Chrome AI or Model settings section.
  </Step>

  <Step title="Enable Chrome AI">
    Toggle on "Enable Chrome AI" or "Use Gemini Nano".
  </Step>

  <Step title="Verify Model Appears">
    The "Gemini Nano" model should now appear in your model selector dropdown.
  </Step>
</Steps>

## Using Chrome AI

### Model Selection

Once enabled, "Gemini Nano" appears in the model selector alongside your other models:

```
Provider: chrome
Model Name: Gemini Nano
Model ID: chrome::gemini-nano::page-assist
```

### Configuration Options

Chrome AI supports basic configuration:

* **Temperature**: Controls randomness (0.0-1.0)
  * Default: `0.8`
  * Lower = more focused and deterministic
  * Higher = more creative and random

* **Top K**: Controls diversity (integer)
  * Default: `120`
  * Lower = more focused on likely tokens
  * Higher = more diverse outputs

### Limitations

Be aware of Chrome AI's limitations:

1. **Model Size**: Gemini Nano is smaller than cloud models like GPT-4
2. **Capabilities**: Less capable than larger models for complex tasks
3. **Context Window**: Limited context length
4. **No Vision**: Text-only, no image understanding
5. **Experimental**: API may change or break
6. **Browser-Specific**: Only works in Chrome Canary/Dev

## Checking Availability

Page Assist automatically checks Chrome AI availability using multiple API versions:

### Modern API (Latest)

```javascript theme={null}
await globalThis.LanguageModel.availability()
```

### Intermediate API

```javascript theme={null}
await ai.languageModel.capabilities()
```

### Legacy API

```javascript theme={null}
await ai.canCreateTextSession()
```

Page Assist supports all API versions for maximum compatibility.

## Troubleshooting

### Model Not Available

<Steps>
  <Step title="Verify Browser Version">
    Ensure you're using Chrome Canary version 128 or higher:

    ```text theme={null}
    chrome://version
    ```
  </Step>

  <Step title="Check Flags">
    Verify flags are enabled:

    ```text theme={null}
    chrome://flags/#prompt-api-for-gemini-nano
    ```
  </Step>

  <Step title="Check Components">
    Navigate to `chrome://components` and verify "Optimization Guide On Device Model" is installed.
  </Step>

  <Step title="Restart Browser">
    Completely quit and restart Chrome Canary.
  </Step>
</Steps>

### Download Stuck

If model download is stuck:

1. Check internet connection
2. Ensure sufficient disk space (\~2GB free)
3. Try manually updating the component in `chrome://components`
4. Restart Chrome Canary
5. Check Chrome's download location isn't full

### Model Not in Page Assist

If Gemini Nano doesn't appear:

1. Verify Chrome AI is enabled in Page Assist settings
2. Check that the model is available in DevTools console
3. Refresh the Page Assist interface
4. Reload the Page Assist extension

### Performance Issues

For slow performance:

1. Close other tabs to free memory
2. Ensure hardware acceleration is enabled
3. Check system resources (RAM, CPU)
4. Consider using a smaller model for simple tasks
5. Clear browser cache and restart

### API Errors

If you get API errors:

```javascript theme={null}
// Check which API version is available
if (typeof globalThis.LanguageModel !== 'undefined') {
  console.log('Modern API available');
} else if (ai?.languageModel?.create) {
  console.log('Intermediate API available');
} else if (ai?.createTextSession) {
  console.log('Legacy API available');
} else {
  console.log('No API available');
}
```

## API Version Compatibility

Page Assist supports multiple Chrome AI API versions:

### Latest API (globalThis.LanguageModel)

```javascript theme={null}
const availability = await LanguageModel.availability();
if (availability === 'available') {
  const session = await LanguageModel.create({
    temperature: 0.8,
    topK: 120
  });
}
```

### Previous API (ai.languageModel)

```javascript theme={null}
const capabilities = await ai.languageModel.capabilities();
if (capabilities.available === 'readily') {
  const session = await ai.languageModel.create({
    temperature: 0.8,
    topK: 120
  });
}
```

### Legacy API (ai.createTextSession)

```javascript theme={null}
const available = await ai.canCreateTextSession();
if (available) {
  const session = await ai.createTextSession({
    temperature: 0.8,
    topK: 120
  });
}
```

## Privacy & Security

Chrome AI offers excellent privacy:

* **No Network Requests**: All processing happens locally
* **No Data Logging**: Your conversations stay on your device
* **No API Keys**: No authentication required
* **Offline Operation**: Works without internet (after download)

## Best Practices

1. **Use for Simple Tasks**: Best for straightforward queries
2. **Combine with Cloud Models**: Use Chrome AI for quick tasks, cloud models for complex ones
3. **Test Regularly**: API is experimental and may change
4. **Keep Chrome Updated**: Update Chrome Canary regularly
5. **Monitor Resources**: Watch RAM usage during inference
6. **Clear Sessions**: Destroy sessions when done to free memory

## When to Use Chrome AI

**Good Use Cases:**

* Quick questions and answers
* Privacy-sensitive tasks
* Offline scenarios
* Testing and development
* Cost-free experimentation

**Not Ideal For:**

* Complex reasoning tasks
* Long document analysis
* Code generation
* Tasks requiring latest knowledge
* Production applications (experimental status)

## Future Developments

Chrome AI is experimental and evolving:

* API may change without notice
* More models may become available
* Capabilities may expand
* Browser support may broaden

Stay updated through:

* Chrome developer blog
* Page Assist updates
* Chrome release notes

## Next Steps

* Learn about [Ollama](/providers/ollama) for more powerful local models
* Explore [OpenAI-compatible APIs](/providers/openai-compatible) for cloud options
* Set up [LM Studio](/providers/lm-studio) for local model management
