Overview
Knowledge Tooltip uses OpenAI’s GPT models to power advanced features like AI explanations and translations. You’ll need to provide your own OpenAI API key to use these features.Features Requiring an API Key
AI Tab
Get simple explanations and ask questions about selected terms
Translate Tab
Translate text between English and Arabic using AI
Getting an OpenAI API Key
Create an OpenAI account
Visit platform.openai.com and sign up or log in
Navigate to API keys
Create a new secret key
Click “Create new secret key” and give it a descriptive name like “Knowledge Tooltip”
Adding Your API Key
How It Works
API Key Validation
The extension performs basic validation before saving:The extension only checks the format (starts with
sk- and is at least 20 characters). It doesn’t verify the key with OpenAI until you use an AI feature.Secure Storage
Your API key is stored inchrome.storage.local, not chrome.storage.sync:
chrome.storage.local
Stored only on this device. Never synced to the cloud or other browsers.
chrome.storage.sync
Used for preferences like language and toggle state. Safe to sync.
Storage Migration
Earlier versions stored the API key in sync storage. The extension automatically migrates to local storage:Using the API Key
When you use an AI feature, the background service worker retrieves the key:Error Handling
The extension detects and reports specific API errors:- INVALID_API_KEY: “Invalid API key. Please check your key in settings.”
- RATE_LIMITED: “Too many requests. Please wait a moment.”
- INSUFFICIENT_QUOTA: “Insufficient OpenAI quota. Please check your account.”
Removing Your API Key
To remove your stored API key:
The removal code:
Removing the API key does not affect your other settings (language preference, toggle state, etc.).
Model Configuration
The extension is configured to usegpt-5-nano with optimized settings:
- Model:
gpt-5-nano- Fast and cost-effective for simple explanations - Max tokens: 500 for most requests, 1000 for translations
- Reasoning effort: Minimal - optimized for quick responses
API Usage Limits
To prevent excessive API usage, the extension enforces limits:AI Chat Limits
Context Limits
Pricing Information
Check OpenAI’s pricing page for current rates. The extension uses
gpt-5-nano which is one of the most affordable models.- Explain Simply: ~100-200 tokens per request
- AI Questions: ~150-300 tokens per exchange
- Translation: ~200-500 tokens per translation
Security Best Practices
- Never share your key: Don’t paste it in emails, chat messages, or public forums
- Use browser profiles carefully: If you share a browser profile, others may access your key
- Rotate keys regularly: Create a new API key every few months and delete the old one
- Monitor usage: Check your OpenAI dashboard regularly for unexpected usage
- Set spending limits: Configure billing limits in your OpenAI account
Troubleshooting
AI tab shows 'No API key set' even after saving
AI tab shows 'No API key set' even after saving
The key was rejected during validation. Make sure it starts with
sk- and is the complete key from OpenAI. Try copying it again.Getting 'Invalid API key' errors
Getting 'Invalid API key' errors
Your key may have been revoked or deleted in the OpenAI dashboard. Generate a new key and update it in the extension.
Rate limit errors appearing frequently
Rate limit errors appearing frequently
You may be hitting OpenAI’s rate limits. Wait a few minutes before trying again, or upgrade your OpenAI plan.
Insufficient quota errors
Insufficient quota errors
Your OpenAI account has run out of credits. Add a payment method or increase your spending limit at platform.openai.com.
Privacy Considerations
When you use AI features, the following data is sent to OpenAI:
- The selected text
- Your question (if asking in AI chat)
- Brief surrounding context from the page (~500 chars)
- The Wikipedia summary (if available)