This document explains how API keys work in CareNet and what costs you can expect.
End Users → Your App (Frontend) → Your Backend → Third-party APIs
↑
(Your API Keys)
Important:
- You (the app owner) provide API keys as environment variables
- End users never see or need API keys
- You pay for API usage based on your users' activity
This is the standard model for production apps - you pay to run the service, your users use it for free.
| Feature | API Required | Fallback Behavior | Cost Impact |
|---|---|---|---|
| Hospital Search | ❌ None | Always works (JSON data) | Free |
| Interactive Map | ❌ None | Always works (Leaflet) | Free |
| Insurance Card Scan | Dedalus API | Demo mode with sample data | ~$0.01 per scan |
| Voice Triage | Dedalus API | Demo mode with keyword matching | ~$0.01 per triage |
| AI Booking Agent | ElevenLabs | Feature disabled, direct call option shown | ~$0.10-0.30 per call |
| Payments | Flowglad | N/A | Transaction fees |
No API keys needed. Users can:
- ✅ Search hospitals by location
- ✅ Filter by facility type
- ✅ View cost estimates
- ✅ Get directions
- ✅ Call hospitals directly
Monthly cost: $0
- Cost: ~$0.01 per API call
- Monthly estimate for 1,000 users:
- Card scans: 1,000 × $0.01 = $10
- Voice triage: 1,000 × $0.01 = $10
- Total: ~$20/month
Setup:
- Sign up at dedaluslabs.ai
- Get API key
- Add to Vercel:
DEDALUS_API_KEY=your-key
Add ElevenLabs for AI booking:
- Cost: ~$0.10-0.30 per call
- Monthly estimate for 1,000 users:
- Assuming 30% use booking: 300 × $0.20 = $60
- Total: ~$60/month
Setup:
- Sign up at elevenlabs.io
- Create a Conversational AI agent
- Get credentials
- Add to Vercel:
ELEVENLABS_API_KEY=your-key ELEVENLABS_AGENT_ID=your-agent-id ELEVENLABS_AGENT_PHONE_NUMBER_ID=your-phone-id
Combined total with all features: ~$80/month for 1,000 active users
# No API keys needed
# Use demo mode for AI featuresCost: $0/month
DEDALUS_API_KEY=your-key
# Skip ElevenLabs, users call directlyCost: ~$2/month
DEDALUS_API_KEY=your-key
ELEVENLABS_API_KEY=your-key
ELEVENLABS_AGENT_ID=your-agent-id
ELEVENLABS_AGENT_PHONE_NUMBER_ID=your-phone-idCost: ~$80/month
# Deploy to Vercel with no API keys
vercel
# Your app works with:
# - Hospital search ✅
# - Map view ✅
# - Demo card scanning ✅
# - Demo voice triage ✅
# - Direct calling ✅When you're ready for real AI features:
- Go to dedaluslabs.ai and sign up
- Get your API key
- In Vercel Dashboard → Settings → Environment Variables
- Add:
DEDALUS_API_KEY=your-actual-key - Redeploy
Now card scanning and voice triage use real AI!
When you want AI booking:
- Go to elevenlabs.io and sign up
- Create a Conversational AI agent
- Configure it for medical appointment scheduling
- Get your credentials
- Add to Vercel environment variables
- Redeploy
- Start with demo mode - Test your app without API costs
- Add Dedalus first - Core AI features, low cost
- Add ElevenLabs later - When you have real users who want booking
- Monitor usage - Most APIs have dashboards showing usage/costs
- Set spending limits - Both Dedalus and ElevenLabs allow budget caps
- Cache results - Consider caching common queries to reduce API calls
✅ DO:
- Store API keys in Vercel environment variables
- Use
.env.localfor local development (never commit this) - Rotate keys if exposed
- Monitor API usage for unusual patterns
❌ DON'T:
- Hardcode API keys in code
- Commit API keys to Git
- Share API keys publicly
- Let users provide their own API keys (bad UX)
Q: Do my users need API keys? A: No! You provide the keys, they use the app for free.
Q: What if I don't add any API keys? A: The app still works! Card scanning and triage use demo mode, and users can call hospitals directly.
Q: How do I monitor costs? A: Check your Dedalus and ElevenLabs dashboards for usage stats.
Q: Can I set a spending limit? A: Yes, both Dedalus and ElevenLabs allow you to set monthly budget caps.
Q: What happens if I hit my limit? A: The app gracefully falls back to demo mode for AI features.
- Dedalus API: Check their documentation at dedaluslabs.ai
- ElevenLabs API: Visit elevenlabs.io/docs
- CareNet Issues: Open an issue on GitHub
Summary: Start free with demo mode, add Dedalus ($20/mo for AI), add ElevenLabs ($60/mo for booking) when you scale.