API quota management
Managing your Google Gemini API quota is crucial for uninterrupted service, especially on the free tier.Understanding quotas
The Gemini API free tier includes:- 15 requests per minute (RPM)
- 1,500 requests per day (RPD)
- 4 million tokens per day
Screen Answerer’s 5-second monitoring interval means you’ll make up to 12 requests per minute when actively monitoring. This stays safely under the 15 RPM limit.
Quota optimization strategies
Stop monitoring when not in use
Stop monitoring when not in use
The most effective way to preserve quota:
- Click Stop Monitoring between quizzes
- Don’t leave monitoring running overnight or during breaks
- Only start monitoring right before you expect questions
Use window capture instead of full screen
Use window capture instead of full screen
Capture only the window containing questions:
- Reduces image size sent to API
- Faster processing times
- Better detection accuracy
- Lower bandwidth usage
Choose the right model
Choose the right model
Use the appropriate model for your needs:
- gemini-2.0-flash-lite - Best for simple multiple-choice questions, uses fewer tokens
- gemini-2.0-flash - Better for complex questions, explanations, or calculations
Monitor your usage
Monitor your usage
Track your API consumption:
- Visit Google Cloud Console
- Navigate to APIs & Services → Dashboard
- Select Generative Language API
- View quota usage graphs
Model selection guidelines
Choosing the right model balances speed, accuracy, and cost.When to use gemini-2.0-flash-lite
Best for:- Multiple-choice questions
- Simple fact-based questions
- True/false questions
- Quick lookups
- High-frequency monitoring
- Faster response times (200-400ms average)
- Lower token consumption
- Higher quota efficiency
- Suitable for most quiz scenarios
When to use gemini-2.0-flash
Best for:- Complex problem-solving
- Mathematical calculations
- Essay-style questions
- Questions requiring detailed explanations
- Technical or specialized topics
- Higher accuracy on complex questions
- Better reasoning capabilities
- More detailed responses
- Superior context understanding
You can switch models anytime in Settings → Model tab. The change takes effect immediately for the next request.
Security best practices
Protect your API key and maintain privacy while using Screen Answerer.API key security
Never share your API key
Treat your API key like a password:
- Don’t post it in forums or chat
- Don’t commit it to version control
- Don’t share it with others
- Don’t include it in screenshots
Use API restrictions
Add security restrictions in Google Cloud Console:
- Go to APIs & Services → Credentials
- Click on your API key
- Under Application restrictions, select:
- HTTP referrers and add your domain, OR
- IP addresses and add your network IP
- Under API restrictions, select Restrict key and choose only “Generative Language API”
Rotate keys regularly
Best practice for long-term security:
- Regenerate your API key every 3-6 months
- Delete old keys after rotating
- Update Screen Answerer immediately with new key
Screen capture privacy
Privacy checklist:- ✅ Only capture the window with quiz content
- ✅ Close sensitive documents before monitoring
- ✅ Disable notifications that might appear on screen
- ✅ Use a dedicated browser profile for quizzes
- ❌ Don’t capture your entire screen unnecessarily
- ❌ Don’t monitor when handling confidential information
- ❌ Don’t share your screen capture preview publicly
Data handling
Understand how your data flows:- Screenshot capture - Taken locally in your browser
- Transmission - Sent directly to Google Gemini API (not stored by Screen Answerer)
- Processing - Analyzed by Google’s servers
- Response - Answer sent back to your browser
- Cleanup - Screenshot immediately deleted from temporary storage (server.js:229, 269, 310, 341)
Screen Answerer server acts as a proxy but does not log or store your images. All screenshots are deleted after processing using
history.safelyDeleteFile() and history.markFileProcessed() functions.Performance optimization
Improve response times and reduce resource usage.Client-side optimizations
Use a modern browser
Use a modern browser
Chrome and Firefox offer the best performance:
- Native screen capture APIs
- Optimized image encoding
- Better WebSocket support
- Lower CPU overhead
Close unnecessary applications
Close unnecessary applications
Free up system resources:
- Close unused browser tabs
- Quit background applications
- Disable resource-intensive extensions
- Ensure adequate RAM availability
Optimize capture settings
Optimize capture settings
Select efficient capture options:
- Window capture over entire screen
- Capture at native resolution (don’t upscale)
- Ensure good lighting for better image quality
- Position questions centrally in the window
Network optimization
- Stable connection - Use wired Ethernet if possible
- Bandwidth - Minimum 5 Mbps recommended for smooth operation
- Latency - Lower ping to Google servers improves response times
- Firewall - Ensure
generativelanguage.googleapis.comis not blocked
Server-side considerations
Screen Answerer includes several performance features:- Rate limiting - 5-second minimum between requests (server.js:87-102)
- Retry logic - Automatic retry with exponential backoff (server.js:135-170)
- Quota tracking - Prevents hitting API limits (server.js:104-122)
- Image cleanup - Immediate deletion of temporary files (server.js:227-230)
Error handling
Handle common errors gracefully and know when to retry.Rate limit errors
Error: “Rate limit exceeded” Solutions:- Wait 5-10 seconds before next action
- Reduce monitoring frequency (built-in)
- Check if you’re running multiple instances
- Verify you haven’t exceeded daily quota
Screen Answerer automatically implements retry logic with exponential backoff (server.js:135-170), so most rate limit errors resolve themselves.
API key errors
Error: “Invalid API key” or “API key error” Solutions:- Verify key format (starts with
AIza, 39 characters total) - Check for extra spaces when copying
- Ensure API is enabled in Google Cloud
- Try regenerating the key
- Confirm billing is set up (even for free tier)
Detection issues
Problem: Questions not being detected Solutions:- Ensure question text is clear and readable
- Wait at least 5 seconds after question appears
- Try capturing a larger window area
- Switch to
gemini-2.0-flashfor better detection - Check image preview to verify capture quality
Testing and validation
Verify your setup before critical use.API key validation
Test your API key:"text": "4" or similar.
Monitor testing
- Start monitoring
- Display a sample quiz question on screen
- Wait 5-10 seconds
- Verify answer appears in ANSWER section
- Check Questions Processed counter increments
Performance baseline
Expected metrics:- Detection time: 5-8 seconds from question display
- API response: 200-600ms (flash-lite) or 400-1000ms (flash)
- CPU usage: Less than 10% on modern hardware
- Memory: Less than 100MB additional RAM
Compliance and ethical use
Academic integrity
Appropriate uses:- Self-study and practice quizzes
- Tutoring and educational assistance
- Reviewing quiz answers after completion
- Learning tool for understanding concepts
- Cheating on graded exams
- Academic dishonesty
- Violating testing policies
- Circumventing proctored exam systems
API terms of service
Ensure your use complies with:- Google AI Terms of Service
- Your institution’s acceptable use policy
- Local laws regarding automated testing tools
Next steps
API key setup
Get your Google Gemini API key
Screen monitoring
Start using the screen monitor
Model selection
Choose the right Gemini model
Troubleshooting
Solve common issues