Supported question types
Screen Answerer can process questions in two formats:Text questions
Direct text input for quick answers to typed or pasted questions
Image questions
Screenshot or uploaded images containing quiz questions
Text question processing
Text questions are sent directly to the Gemini API for processing:The prompt is optimized for concise answers. The AI is instructed to provide only the correct answer without additional explanation.
Text processing workflow
Submit question
Send a POST request to
/process_question with your question text in the request body.Image question processing
Image questions are processed using Gemini’s vision capabilities:Image format support
Screen Answerer accepts the following image formats:- PNG (.png) - Recommended for screenshots
- JPEG (.jpg, .jpeg) - Supported for photos
AI model selection
Screen Answerer supports two Gemini models optimized for different use cases:gemini-2.0-flash-lite (Faster)
gemini-2.0-flash-lite (Faster)
The default model optimized for speed and efficiency. Best for:
- Real-time screen monitoring
- Quick quiz answers
- Minimizing API costs
gemini-2.0-flash (Balanced)
gemini-2.0-flash (Balanced)
A more capable model that may provide better accuracy for complex questions. Use when:
- Questions require deeper analysis
- You need more detailed answers
- Speed is less critical than accuracy
Answer formatting
Answers are processed and cleaned before being displayed:- Empty lines
- Markdown bullet points (
*) - Markdown headers (
#) - Extra whitespace
Error handling and retries
Screen Answerer includes robust error handling for API failures:- Max retries: 3 attempts per request
- Initial delay: 1000ms (1 second)
- Exponential backoff: Doubles each retry, up to 10 seconds
- Jitter: Random 0.8-1.2x multiplier to prevent thundering herd
API endpoints
Process text or image question
Process with custom model
The
/process_question_with_key endpoint (server.js:389) allows you to specify both the API key and model in the request body, giving you full control over which model processes your question.Security and file handling
Uploaded images are handled securely:- Validation: Only image MIME types are accepted (server.js:68)
- Size limits: 5MB maximum file size (server.js:79)
- Unique filenames: Timestamped to prevent collisions (server.js:62)
- Automatic cleanup: Files are deleted after processing (server.js:229)
- Reference tracking: The history module prevents premature deletion
Best practices
Use clear images
Ensure quiz questions are clearly visible with good lighting and contrast
Choose the right model
Use flash-lite for speed, flash for accuracy
Monitor API usage
Check your quota in Google AI Studio to avoid rate limits
Keep questions focused
Single, clear questions get better answers than complex multi-part questions