Click the ⚙️ icon and navigate to the “API Key” tab
2
Enter your key
Paste your Gemini API key into the input field
3
Save and validate
Click “Save Settings” to validate and store your key
// API key validation (index.html:936)function validateApiKey(apiKey) { if (!apiKey) { return { valid: false, message: 'Please enter an API key' }; } if (!/^AIza[0-9A-Za-z_-]{35}$/.test(apiKey)) { return { valid: false, message: 'Invalid API key format' }; } return { valid: true };}
Your API key is validated with a test request before being saved. If validation succeeds, you’ll see a success message and can start using the application.
All settings are stored in localStorage and persist between sessions:
Setting
Storage Key
Default Value
API Key
geminiApiKey
None
Model
geminiModel
gemini-2.0-flash-lite
Theme
theme
dark
// Settings are loaded on page load (index.html:899)window.addEventListener('load', function() { const savedApiKey = localStorage.getItem('geminiApiKey'); const savedModel = localStorage.getItem('geminiModel'); const savedTheme = localStorage.getItem('theme') || 'dark'; // Apply saved settings if (savedApiKey) apiKeyInput.value = savedApiKey; if (savedModel) modelSlider.value = modelOptions.indexOf(savedModel); // Theme is applied automatically});
How do I reset my settings?
Clear your browser’s localStorage data for the Screen Answerer domain. This will remove your API key, model preference, and theme selection. You’ll need to reconfigure everything on your next visit.
When you first open Screen Answerer without an API key configured, you’ll see a welcome message:
<!-- From index.html:654 --><div id="firstTimeSetup" class="card" style="display: none; border-left: 4px solid var(--warning-color);"> <h2>Welcome to Quiz Assistant!</h2> <p>To get started, you need to set up your Google Gemini API key.</p> <p>Click the ⚙️ settings icon in the top right corner to configure your API key.</p> <button id="openSettingsBtn" class="save-settings">Open Settings</button></div>
This guidance ensures new users can quickly get started with the application.
Check that your browser allows localStorage for the Screen Answerer domain. Some privacy extensions or browser modes (like private/incognito) may block localStorage.
API key validation fails
Ensure your API key follows the correct format (AIza followed by 35 alphanumeric characters, hyphens, or underscores). Test the key in Google AI Studio to verify it’s valid.
Theme not applying
Try clearing your browser cache and reloading the page. If the issue persists, check the browser console for JavaScript errors.