Valetudo AI is a Perplexity Sonar-powered assistant that delivers science-backed, fast, and clear medical answers. It helps reduce misinformation by providing citations from verified sources β with support for filters by date, country, and even image upload.
The name Valetudo comes from Latin and means βhealthβ π©Ί. The project is designed for conscious users seeking reliable medical information: caring parents, patients, and medical students. Ask about symptoms, drug interactions, or safe alternatives β and get trustworthy answers instantly.
Watch Valetudo AI in action π:
- Chat with AI using Perplexity Sonar Pro
- Answers with numbered scientific citations
- Limited to 10 trusted sources for clarity
- Filters by date and user location
- Image upload for visual context (e.g. meds or conditions)
- Prompt templates (7 categories) for common medical queries:
- Symptom-based advice
- Drug interaction checks
- Safety timing
- Safer treatments
- Compare effectiveness
- Recommended exercises
- Latest research
- Follow-up input to clarify or expand your question
- Prioritization of local sources when a country is selected
- Markdown formatting and clean tables
- Easily copy and open source links
- Simple and user-friendly interface
Ask questions. Get trusted answers in seconds.
π§ Integrated Features (per Perplexity API documentation):
Feature | API Field |
---|---|
Search Context Size | search_context_size: medium |
Domain Filtering | search_domain_filter |
Image Upload | image_url |
Date Filtering | search_after/before_date_filter |
User Location Filter | user_location |
Upload an image β AI will analyze it too.
- Frontend: React, Vite, Tailwind CSS
- AI Integration: Perplexity Sonar Pro API
- Markdown Renderer: React Markdown, rehype-raw
- UI Framework: React Select, React Icons, React Datepicker
- Image handling: base64 encoder and preview
- Backend: Python, Flask (proxy for API calls)
git clone https://github.com/vero-code/valetudo-ai.git
cd valetudo-ai
Create a .env
file inside the /backend
folder:
PERPLEXITY_API_KEY=your_api_key_here
π Refer to
/backend/.env.example
β οΈ Never commit your.env
file to version control.
npm install
npm run dev
cd backend
python -m venv venv
venv\Scripts\activate # On Windows
# OR
source venv/bin/activate # On macOS/Linux
pip install -r requirements.txt
python app.py
The app will be available at http://localhost:5173
- Example:
What to do if a 5-year-old has a fever?
- Click "Ask AI" and expand the full answer
- Hover over citation numbers to preview and copy links
- Click "Show advanced options"
- Set a custom date range
- Choose a country for localized results
- Drag and drop an image or upload manually
- Ask:
What is this medication?
- The AI will include visual analysis
- Click "Try Prompts"
- Choose a category, fill in the fields, and generate a ready-to-send query
- Use the Follow-up input to deepen the conversation
Save time with prompts and follow-up questions.
valetudo-ai/
βββ backend/ # Flask backend API
βββ public/ # Static files
βββ screenshots/ # UI Images
βββ src/
β βββ assets/ # Media resources
β βββ components/ # React components
β βββ constants/ # Mock data and templates
β βββ hooks/ # Custom React hooks
β βββ utils/ # Helper functions
β βββ App.jsx # Routes
β βββ index.css # Styles
β βββ main.jsx # App entry point
βββ index.html # Main HTML file
βββ LICENSE # License file
βββ package.json # Dependencies
βββ README.md # Documentation
βββ vite.config.js # Vite config
HeroSection
β landing section with input, filters, and image uploadAskPage
β category-based prompt system with follow-up formQuickAnswerBox
β renders AI response with Markdown + citation links
- No user data is stored
.env
securely manages API key- Rate limits and usage caps can be added in production
- Not a diagnostic tool β for informational use only
- Response time may vary with filters or image uploads
- Mobile layout is simplified (desktop-first)
Disclaimer: This is not a medical device. Always consult a doctor for clinical decisions.
MIT License β free to use, modify, and distribute, with attribution.
Built with β€οΈ for the Perplexity Global Hackathon
Powered by the Sonar API