--- title: Farient DeckCheck API emoji: 📊 colorFrom: blue colorTo: indigo sdk: docker app_port: 8000 pinned: false short_description: AI-powered brand-compliance review for executive decks. --- # Farient DeckCheck — API FastAPI backend for the DeckCheck multi-agent audit pipeline. ## Endpoints - `POST /api/audits` — upload a `.pptx`, get a `job_id` - `GET /api/audits` — list audits - `GET /api/audits/{job_id}` — poll status - `GET /api/audits/{job_id}/events` — Server-Sent Events stream - `GET /api/audits/{job_id}/slides` — slides + findings - `GET /api/audits/{job_id}/slides/{n}/image` — rendered slide PNG - `GET /api/audits/{job_id}/export?fmt=md|json|pdf|pptx` — export - `DELETE /api/audits/{job_id}` — cancel + remove - `GET /health` — liveness probe - `GET /health/preflight` — environment readiness checks ## Required environment variables (set in Space settings) | Var | Purpose | Required | |---|---|---| | `OPENAI_API_KEY` | OpenAI API access | ✅ | | `WEB_ORIGINS` | CORS allowlist, comma-separated origins (e.g. your Vercel URL) | ✅ | | `OPENAI_MODEL_SLIDE` | Per-slide reviewer model (default `gpt-4o-mini`) | optional | | `OPENAI_MODEL_DECK` | Deck consistency model (default `gpt-4o`) | optional | | `OPENAI_MODEL_MERGE` | Lead auditor merge model (default `gpt-4o`) | optional | | `OPENAI_REVIEW_CONCURRENCY` | Per-slide review concurrency (default `2`) | optional | | `MAX_UPLOAD_MB` | Upload size cap (default `60`) | optional | ## Architecture Pipeline: **parse → render** (LibreOffice, headless) → **review** (per-slide single-shot `gpt-4o-mini` with deterministic safety-net injection) → **deck consistency** (`gpt-4o`) → **lead auditor merge** (`gpt-4o`) → **finalize**. Realtime UX via SSE. Job state persists at `/tmp/audits/{job_id}/` during the Space's container lifetime. Frontend: separate Next.js app deployed to Vercel that talks to this API.