scythe410/vectorscape-reducer
0
VectorScape Reducer
FastAPI service that turns text rows into 3D coordinates + clusters for the VectorScape web app. The web app calls this service over HTTPS with a shared secret in the X-Reducer-Secret header.
Endpoints
GET /health— liveness probe (unauthenticated).POST /embed-reduce— embed → optional PCA → PaCMAP/UMAP → HDBSCAN, then writepoints+clustersrows to Supabase. RequiresX-Reducer-Secret.GET /status/{project_id}— poll project status. RequiresX-Reducer-Secret.POST /bridge— explain the gap between two clusters via LLM. RequiresX-Reducer-Secret.
Required environment
Set these as secrets in the Space settings (Settings → Variables and secrets):
Notes
- The
all-MiniLM-L6-v2model is pre-downloaded at image build time, so the first request after a cold start doesn't pay the model download cost. - Inline-only on this Space (no arq worker, no Redis). Datasets above the threshold will time out the HTTP request — small/demo CSVs only.
- Source of truth: this directory is mirrored from the `vector-scape` monorepo's
services/reducer/.
