To enable AI functionality, you need to set up API keys in your environment variables:
- GEMINI_API_KEY - Primary AI service (Google Gemini)
- OPENAI_API_KEY - Fallback AI service (OpenAI GPT)
- Go to your Vercel Dashboard
- Select your project
- Go to Settings → Environment Variables
- Add these variables:
GEMINI_API_KEY = your_gemini_key_here OPENAI_API_KEY = your_openai_key_here
- Go to your Netlify Dashboard
- Select your site
- Go to Site Settings → Environment Variables
- Add these variables:
GEMINI_API_KEY = your_gemini_key_here OPENAI_API_KEY = your_openai_key_here
- Create a
.env.localfile in your project root - Add your API keys:
GEMINI_API_KEY=your_gemini_key_here OPENAI_API_KEY=your_openai_key_here
- Visit: https://makersuite.google.com/app/apikey
- Sign in with your Google account
- Click "Create API Key"
- Copy the generated key
- Visit: https://platform.openai.com/api-keys
- Sign in to your OpenAI account
- Click "Create new secret key"
- Copy the generated key
| Tool | Primary API | Fallback API | Features |
|---|---|---|---|
| FamIdea | Gemini | OpenAI | Swedish content ideas generation |
| FamiShort | Gemini | None | AI description writer |
| FamUniversal | Gemini (10 keys rotation) | None | Article generation |
- FamIdea uses both APIs with automatic switching
- FamiShort uses only Gemini API
- FamUniversal supports up to 10 Gemini API keys for high-volume usage
- Without API keys, tools will show demo content
- API keys are never exposed to the frontend
# Install dependencies
npm install
# Run locally
npm run dev
# Build for production
npm run build
# Deploy to Netlify
npm run netlify:build
# Preview production build
npm run previewFamIdea uses an intelligent dual-API system:
- Primary: Gemini API (optimized for Swedish content)
- Fallback: OpenAI API (when Gemini fails or rate limited)
- Automatic Switching: Seamless transition between APIs
- Demo Mode: Works without API keys for testing
# Vercel/Netlify Dashboard
GEMINI_API_KEY=AIzaSyC1234567890abcdef...
OPENAI_API_KEY=sk-proj-1234567890abcdef...
# Local Development (.env.local)
GEMINI_API_KEY=AIzaSyC1234567890abcdef...
OPENAI_API_KEY=sk-proj-1234567890abcdef...-
"API key not configured" error
- Check environment variable names (case-sensitive)
- Ensure API keys are valid
- Redeploy after adding keys
-
"Demo Content" showing
- API keys not set or invalid
- Check platform-specific setup instructions
-
Rate limit errors
- FamIdea will automatically switch to OpenAI
- Consider upgrading API plan for higher limits
Once API keys are configured:
- Deploy your changes
- Visit your site
- All AI tools will work with real AI generation
- Enjoy the full FamMap AI Tools experience!
Need Help? Check the in-app API Info buttons for real-time status and setup guidance.