Skip to content

API Reference

All routes are mounted under /api in backend/src/index.ts. The route handlers live in backend/src/routes/ (one file per group, ~65 files). Most routes require authentication via the requireAuth middleware; admin-only routes use requireAdmin. A few setup/boot endpoints are intentionally unauthenticated because they run before a session exists.

This page groups routes by area rather than listing every endpoint. To see the exact handlers for a group, read the matching file in backend/src/routes/.


Auth & session

backend/src/routes/auth.ts, mounted at /api/auth.

MethodPathDescription
GET/api/auth/profilesList selectable profiles (no auth)
POST/api/auth/selectSelect a profile (no auth)
POST/api/auth/verify-pinVerify PIN, issue session cookie
GET/api/auth/meCurrent user
POST/api/auth/logoutInvalidate session

Sessions are HttpOnly cookies named session; the PIN is Argon2id-hashed (Bun.password.hash) with an HMAC pepper. See Architecture for the auth flow.


Setup, boot & background jobs

GroupPrefixFileNotes
Setup wizard/api/setupsetup.tsGET /status, POST /admin, GET /ollama-status, GET /catalog, POST /download (SSE), POST /welcome-complete, PUT /state
System / boot/api/systemsystem.tsGET /system/ready (no auth, 503 until boot done), GET /system/boot (SSE boot + auto-repair stream)
Background jobs/api/jobsjobs.tsGET /status, POST /enqueue, POST /:id/retry, POST /:id/cancel, POST /retry-all-failed
Feature flags/api/app-featuresappFeatures.tsGET / (flags), PUT /:id (admin toggle)
App store/api/app-storeappStore.tsInstall/uninstall apps & extensions
Notifications/api/notificationsnotifications.tsUser/admin notifications

See Boot & Feature System for the SSE event shapes.


Chat, models & tools

GroupPrefixFileNotes
Chat/api/chatchat.tsGET /conversations, GET /conversations/:id, DELETE/PATCH /conversations/:id, POST /chat/stream (SSE token stream)
Models/api/modelsmodels.tsOllama model list/select
Tools/api/toolstools.tsReactive tool config/invocation
Projects/api/projectsprojects.tsProject grouping for conversations
Companions/api/companionscompanions.tsCompanion roster, favorites, grants

Image, vision & music

GroupPrefixFileNotes
Image generation/api/imageimage.tsPOST /generate, GET /status (SSE progress), GET /loras, POST /enhance-prompt, POST /reference-face, etc. (ComfyUI-backed)
Vision/api/visionvision.tsVLM image analysis (structured JSON)
Music/api/musicmusic.tsOffline music-engine generation

Voice

GroupPrefixFileNotes
TTS/api/ttstts.tsStreaming sentence-chunked TTS (NDJSON PCM)
STT/api/sttstt.tsWhisper transcription (voice sidecar)
Voice/api/voicevoice.tsVoice config, wake-word model serving

Content, library & maps

GroupPrefixFileNotes
Library/api/archivesarchives.tsZIM archive list + kiwix-serve proxy
Maps/api/mapsmaps.tsFTS geocoder, GraphHopper routing, pmtiles serving
Bookmarks/api/bookmarksbookmarks.tsPersonal + global bookmarks
Proxy/api/proxyproxy.tsBookmark/embed proxy (SSRF-guarded)
Content policy/api/contentcontent.tsContent-rating dials
Privacy/api/privacyprivacy.tsPIN-gated adult-content state
Home inventory(see home-inventory routes)home.tsDevice tracker, service log, warranties
Home layout/api/home-layouthomeLayout.tsPer-user home widget layout
Home Assistant/api/home-assistanthomeAssistant.tsSmart-home control via HA Assist
Videos (hub)/api/videosvideos.tsSource-parameterized browse/search/creators/saves over the provider registry (Reddit/TikTok/Vimeo/link)
Videos (YouTube source)/api/youtubeyoutube.tsInnerTube search/browse, stream proxy, collections
Videos (stream cache)/api/vstreamvideoStream.tsOn-demand real-file streaming for PiP/mini-player
Podcasts/api/podcastspodcasts.tsShow/episode generation + reverse-link
Shows/api/showsshows.tsTV discovery, watchlist, progress, Plex badge
Movies/api/moviesmovies.tsFilm discovery, watchlist, Plex badge
Global search/api/searchsearch.tsCmd+K unified provider registry (bookmarks/companions/devices/youtube/etc.)
Plex/api/plexplex.tsPer-user linking, library feeds, watchlist/watched sync, direct-play proxy. See Plex Integration

Shopping, lookup & everyday tools

GroupPrefixFileNotes
Shopping/api/shoppingshopping.tsPrice tracking, deals, coupons, photo identify. See Shopping
Reverse Lookup/api/lookuplookup.tsProperty + people lookup (also backs the Maps residential panel)
File Converter/api/converterconverter.tsImage/audio/video conversion, SSE progress
Speed Test/api/speedtestspeedtest.tsInternet/server/server-internet throughput tests
Skills/api/skillsskills.tsPersonal + shared companion instruction skills
Voice Memos/api/voice/memosvoiceMemos.tsRecord, transcribe, list, delete
Notifications/api/notifynotifyChannels.tsPer-user channel routing + Telegram self-link code

Today / briefing data sources

Read-only data endpoints used by the Today/Home widgets and the daily-briefing system: news.ts (/api/news), onThisDay.ts (/api/on-this-day), sports.ts / sportsToday.ts (/api/sports, /api/sports/today), joke.ts / jokes.ts, bored.ts, holidays.ts, localEvents.ts, tvShows.ts, whereToWatch.ts, recipes.ts, dictionary.ts, medical.ts, logo.ts.


Admin

Admin route groups live under /api/admin/* and require requireAdmin:

adminInstall, adminUninstall, adminQueue, adminStorage, adminConnectivity, adminLocale, adminContent, adminMemory, adminCompanions, adminVoice, adminWakewords, adminImageLoras, adminArchives, adminMaps, adminBookmarks, adminBriefing, adminHomeAssistant, adminNotify (Telegram bot token + SMTP config), adminSpeedtest (rating thresholds), adminFrigate, adminNews, plus the benchmark streams adminChatBenchmark, adminRouterBenchmark, and adminLatencyTest (each exposes an SSE /stream). This list groups by area rather than naming every admin route file; see backend/src/routes/admin*.ts for the full set.


Static & docs

In production the backend serves the built SPA from ../frontend/dist (serveStatic, with an index.html fallback for client routing) and the docs site from ../docs/dist at /docs/*. In development the frontend runs on the Vite dev server (port 5173) and the backend allows it via CORS.