This guide will help you obtain and configure the required API keys for the Modern LinkedIn Profile Analyzer.
You need only 2 API keys to run this application:
- OpenAI API Key - For AI-powered profile analysis
- Tavily API Key - For LinkedIn profile search
- Visit: OpenAI Platform
- Sign Up/Login: Create account or sign in
- Navigate: Go to "API Keys" section
- Create: Click "Create new secret key"
- Copy: Save the key (starts with
sk-)
- Pay-per-use: Only pay for what you use
- GPT-4: ~$0.03 per 1K tokens (very affordable)
- Free Credits: New accounts often get free credits
- Visit: Tavily
- Sign Up: Create a free account
- Dashboard: Go to your dashboard
- API Key: Find and copy your API key
- Free Tier: 1,000 searches per month
- Paid Plans: Available for higher usage
Create a file named .env in your project root:
# OpenAI API Key (Required)
OPENAI_API_KEY=sk-your-openai-key-here
# Tavily API Key (Required)
TAVILY_API_KEY=tvly-your-tavily-key-here
# LangSmith API Key (Optional - for monitoring)
LANGSMITH_API_KEY=your-langsmith-key-here- No quotes needed around the keys
- No spaces around the
=sign - Keep it secure - don't share your
.envfile - Add to .gitignore to avoid committing keys
python quick_test.py✅ .env file found
✅ All required API keys found
Light Usage (10 profiles/day):
- OpenAI: ~$0.50/month
- Tavily: Free tier sufficient
- Total: ~$0.50/month
Heavy Usage (100 profiles/day):
- OpenAI: ~$5.00/month
- Tavily: ~$10.00/month
- Total: ~$15.00/month
- Never commit
.envfiles to version control - Use environment variables in production
- Rotate keys regularly if compromised
- Monitor usage to detect unauthorized access
- Set spending limits on OpenAI account
.env
*.env
.env.local
.env.production- Check
.envfile exists in project root - Verify key names match exactly
- Ensure no extra spaces or characters
- Verify keys are copied correctly
- Check for expired or revoked keys
- Ensure sufficient credits/quota
- Wait before retrying
- Check your usage limits
- Consider upgrading your plan
import openai
openai.api_key = "your-key-here"
# Try a simple completionimport requests
headers = {"Authorization": "Bearer your-key-here"}
# Try a simple search- Check this guide for common solutions
- Run diagnostics:
python quick_test.py - Verify key format and validity
- Check account status on provider websites
- OpenAI:
sk-proj-abc123...(starts withsk-) - Tavily:
tvly-abc123...(starts withtvly-)
Once your keys are configured:
- Run the quick test:
python quick_test.py - Start the application:
python frontend_modern.py - Open your browser:
http://127.0.0.1:8050 - Analyze profiles: Enter any name and click "Analyze"
🔐 Keep Your Keys Safe! These keys provide access to paid services, so treat them like passwords and never share them publicly.