Getting started
Install dependencies, add keys, then run the dev server.
npm install cp .env.example .env.local npm run dev
Prerequisites
Node 18+ (required by Next.js).
At least one provider API key (OpenAI or Anthropic).
Postgres and Redis are optional but recommended for production.
Minimum config
Set at least one provider key in `.env.local`.
OPENAI_API_KEY=... # or ANTHROPIC_API_KEY=...
Test the API
Send a streaming request to `/api/chat`.
curl -N http://localhost:3000/api/chat \
-H 'Content-Type: application/json' \
-d '{"provider":"auto","profile":"auto","ecoMode":true,"messages":[{"role":"user","content":"hello"}]}'If `REQUIRE_AUTH` is true, add `Authorization: Bearer YOUR_KEY`.