A Chrome extension that lets you select text or capture screenshots on any webpage and ask AI about them.
- Text Selection: Select any text on a webpage, click the AskAI button, and ask questions about it
- Screenshot Capture: Capture any area of the screen and ask AI to analyze it
- Multiple AI Providers: Support for OpenAI, Anthropic, Google AI, xAI, and DeepSeek
- Dynamic Model Lists: Models are fetched from each provider's API and cached for 24 hours
- Conversation History: Continue the conversation with follow-up questions
- Dark/Light Mode: Toggle theme in the modal
- Remember Settings: Remembers your last used provider and model
| Provider | Vision Support | Model Sorting |
|---|---|---|
| OpenAI | Yes | By release date (newest first) |
| Anthropic | Yes | By release date (newest first) |
| Google AI | Yes | By model ID |
| xAI | No | By release date (newest first) |
| DeepSeek | No | By model ID |
Available models are fetched dynamically from each provider's API. The model list is cached for 24 hours and can be cleared manually from the extension settings.
- Clone or download this repository
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
askaifolder
- Click the AskAI extension icon in Chrome toolbar
- Enter your API key for each provider you want to use
- Click the checkmark to save
- Select any text on a webpage
- Click the "AskAI" button that appears
- Choose your provider and model
- Type your question or use a quick prompt
- Press Enter or click the send button
- Click the AskAI extension icon
- Click "Capture Screenshot & Ask AI"
- Click and drag to select an area
- Type your question about the captured image
- Press Enter or click the send button
askai/
├── manifest.json # Extension configuration
├── background/
│ ├── service-worker.js # Message router (entry point)
│ ├── api-chat.js # Chat API calls to AI providers
│ └── api-models.js # Model list fetching and caching
├── content/
│ ├── content.js # Text selection, screenshot, modal UI
│ └── content.css # Styles for floating button and modal
├── popup/
│ ├── popup.html # Settings popup
│ ├── popup.css # Settings styles
│ └── popup.js # Settings logic
└── icons/ # Extension icons
- Add provider name to
PROVIDER_NAMESincontent/content.js - Add provider to
PROVIDERSarray inpopup/popup.js - Add chat API endpoint to
API_ENDPOINTSand call function inbackground/api-chat.js - Add model list endpoint and fetch function in
background/api-models.js - Add host permission in
manifest.json
Add the provider ID to EXCLUDED_FROM_SCREENSHOT array in content/content.js:
const EXCLUDED_FROM_SCREENSHOT = ['xai', 'provider_id'];API keys are stored locally in Chrome's sync storage and are never sent anywhere except to the respective AI provider APIs.
Get your API keys from:
- OpenAI: https://platform.openai.com/api-keys
- Anthropic: https://console.anthropic.com/
- Google AI: https://aistudio.google.com/apikey
- xAI: https://console.x.ai/
- DeepSeek: https://platform.deepseek.com/
MIT