Authenticated JSON endpoints under /api. All routes expect a Supabase session cookie unless noted otherwise.
/api/dashboard/metrics — consumption aggregates/api/providers — list provider connections (masked)/api/providers — create connection/api/providers/[id] — update name or secret/api/providers/[id] — remove connection/api/usage/ingest — batch usage events (details)/api/settings/budget — monthly budget USDNo valid session — sign in and retry with cookies.
Database object missing or misconfigured; run migrations and check Supabase (Supabase setup).
const res = await fetch("/api/dashboard/metrics", {
credentials: "include",
})
const data = await res.json()