Overview
Screen Answerer requires a Google Gemini API key to process quiz questions and generate answers. Your API key is stored locally in your browser and is never sent to our servers - it goes directly to Google’s Gemini API.Screen Answerer uses client-side storage for your API key. This means your key stays on your device and is only used to authenticate with Google’s Gemini API.
Obtaining a Gemini API key
Visit Google AI Studio
Navigate to Google AI Studio to access the API key management page.
Sign in with your Google account
If you’re not already signed in, use your Google account credentials. You’ll need an active Google account to create API keys.
Create a new API key
Click the “Create API Key” button. Google will generate a new key for you instantly.
The Gemini API offers a generous free tier, making it perfect for students and casual users.
Configuring your API key in Screen Answerer
First-time setup
When you first launch Screen Answerer, you’ll see a welcome message prompting you to configure your API key:Open settings
Click the ⚙️ settings icon in the top-right corner of the application, or click the “Open Settings” button in the welcome message.
Navigate to API Key tab
In the settings modal, ensure you’re on the “API Key” tab (it’s the first tab by default).
Enter your API key
Paste your Gemini API key into the input field labeled “Enter your Gemini API Key”.
API key validation
When you save your API key, Screen Answerer performs validation by:- Format checking - Verifies the key matches the expected pattern:
/^AIza[0-9A-Za-z_-]{35}$/ - API testing - Sends a test question to the Gemini API to confirm the key works
server.js:402:
Updating your API key
To change or update your API key:- Click the ⚙️ settings icon
- Navigate to the “API Key” tab
- Replace the existing key with your new one
- Click “Save Settings” to validate and store the new key
Security and storage
Local storage
Your API key is stored in your browser’slocalStorage under the key geminiApiKey. This means:
Benefits of local storage
Benefits of local storage
- Privacy: Your key never passes through Screen Answerer’s servers
- Persistence: The key remains saved even after closing your browser
- Direct communication: API requests go straight from your browser to Google
Security considerations
Security considerations
- The key is stored in plain text in localStorage
- Anyone with access to your browser can retrieve it
- Clear your browser data will delete the stored key
- Use browser profiles or incognito mode for additional isolation
API key transmission
Fromindex.html:1086-1089, your API key is sent directly to the backend:
server.js:426):
Troubleshooting
Invalid API key format
Double-check that you’ve copied the entire key without any extra spaces or characters.Authentication errors
If you receive authentication errors:- Verify the API key is active in Google AI Studio
- Check if the key has been revoked or expired
- Ensure your Google account has API access enabled
Quota exceeded
The Gemini API has rate limits. If you exceed your quota, you’ll see: “API quota exceeded. Please try again later.”
server.js:462-466:
- Wait for the quota to reset (typically every minute)
- Reduce the frequency of screen monitoring
- Consider upgrading to a paid tier for higher limits
Best practices
Next steps
Model selection
Choose the right Gemini model for your needs
Settings
Customize your Screen Answerer experience