The CORS errors you're seeing are because browsers block direct API calls to ElevenLabs from localhost. The proxy server solves this by handling the API calls server-side.
# Navigate to server directory
cd server
# Install dependencies (if not already done)
npm install
# Start the proxy server
npm startcd server
npm run dev-
Open a new terminal/command prompt
-
Check health endpoint:
curl http://localhost:3001/health
OR visit: http://localhost:3001/health
-
You should see:
{ "status": "OK", "timestamp": "2025-09-26T...", "services": { "elevenlabs": { "available": true, "error": null }, "openai": { "available": true, "error": null }, "supabase": { "available": true, "error": null } } }
Once the proxy is running:
- Go back to your Chronicles app: http://localhost:8080/conversation-sync
- Click "Test Transcript Capture"
- The test should now work without CORS errors!
- Handles CORS: Server-side requests bypass browser CORS restrictions
- Manages Auth: Securely uses your ElevenLabs API key server-side
- Error Handling: Better error messages and debugging
- Rate Limiting: Prevents API overuse
- Check if port 3001 is already in use
- Verify your
.envfile hasVITE_ELEVEN_LABS_API_KEY
- Check console logs in proxy terminal
- Verify your ElevenLabs API key is correct
- Check if your agent ID is valid
- Visit: http://localhost:3001/api/elevenlabs/agents
- This will list all your available agents
Make sure your .env file has:
VITE_ELEVEN_LABS_API_KEY=your_actual_api_key_here
VITE_USE_PROXY=true
VITE_PROXY_URL=http://localhost:3001
After starting the proxy:
- ✅ Test Transcript Capture should work
- ✅ Test Integration should pass
- ✅ Test Real-time Sync should sync conversations
Your enhanced ElevenLabs access will be fully testable!