Part 1 of 3

Environment Variables in Vercel

OpenRouter API key and Upstash Redis credentials.

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

  1. Go to your project in Vercel
  2. Navigate to Settings → Environment Variables
  3. Add each variable with its value (Upstash credentials paste as separate lines — that's fine!)
  4. 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.