AI investigative assistant for the NC State Hackathon 2026. Takes mixed evidence (video + text) and reconstructs what happened using TwelveLabs, Gemini, and ElevenLabs.
Theme: Urban Noir — crime, mystery, surveillance, deception, fragmented truth.
- Video analysis — Extract key events with timestamps using TwelveLabs
- Evidence fusion — Combine video + text into structured JSON via Gemini
- Noir narration — Generate detective-style audio summary with ElevenLabs
NightArchivist/
├── backend/ # FastAPI (Python)
├── frontend/ # Next.js (TypeScript)
├── data/ # Local case storage (created at runtime)
└── README.md
- Python 3.10+
- Node.js 18+
- API keys: Gemini, TwelveLabs, ElevenLabs
Create backend/.env from the example:
cp backend/.env.example backend/.envEdit backend/.env and add your API keys:
GEMINI_API_KEY=your_gemini_api_key
TWELVELABS_API_KEY=your_twelvelabs_api_key
ELEVENLABS_API_KEY=your_elevenlabs_api_key
Where to get keys:
- Gemini API
- TwelveLabs — sign up and create an API key
- ElevenLabs — sign up and create an API key
TwelveLabs index (optional): If you have an existing index ID, set TWELVELABS_INDEX_ID in .env. Otherwise the backend will create one at first use (index creation can take a minute).
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000The API runs at http://localhost:8000.
cd frontend
npm install
npm run devThe app runs at http://localhost:3000.
If the backend is on a different host/port, create frontend/.env.local:
NEXT_PUBLIC_API_URL=http://localhost:8000
Full demo (no APIs): Set DEMO_MODE=true — skips TwelveLabs, LLM, and ElevenLabs. Uses mock data for everything.
Hybrid (real video + audio, mock LLM): Set MOCK_LLM_ONLY=true — TwelveLabs and ElevenLabs run for real; only the reasoning/fusion step (Gemini/LLM) is mocked. Use when LLM APIs are failing but TwelveLabs and ElevenLabs keys work.
- Upload — Select a video file (mp4, mov, etc.) and a text file (.txt) with evidence
- Processing — Wait while the pipeline runs: Video Analysis → Reasoning → Narration
- Results — View case summary, timeline, contradictions, open questions, and play the noir narration
| Method | Endpoint | Description |
|---|---|---|
| POST | /cases |
Create new case, returns case_id |
| POST | /cases/{id}/upload |
Upload video + text (multipart) |
| POST | /cases/{id}/process |
Start processing pipeline |
| GET | /cases/{id}/status |
Get processing status |
| GET | /cases/{id}/result |
Get final JSON + narration URL |
| GET | /cases/{id}/narration |
Stream narration MP3 |
MIT