Your AI features need three secrets configured in Vercel (or wherever you host).
The Three Variables
OPENROUTER_API_KEY
From openrouter.ai → Keys → Create new key with a memorable name → Copy immediately (you won't see it again!)
UPSTASH_REDIS_REST_URL
From upstash.com → Your Redis Database → Connect → Copy (both URL and Token can be copied together)
UPSTASH_REDIS_REST_TOKEN
From upstash.com → Your Redis Database → Connect → Copy (pastes as separate lines in Vercel)
Adding to Vercel
- Go to your project in Vercel
- Navigate to Settings → Environment Variables
- Add each variable with its value (Upstash credentials paste as separate lines — that's fine!)
- Save — Vercel will ask if you want to redeploy. Click yes!
💡 Easy redeploy: When you save environment variables, Vercel prompts you to redeploy automatically. One click and your changes are live.
Never commit these to git! Use your hosting provider's environment variables instead.