Admin Console
Inspect platform data: OpenRouter spend and recent usage events logged by demos.
Admin user ID required. Find your UUID in the Supabase dashboard under Authentication → Users, then confirm it exists in the platform_admins table. If you see a 403, your user ID is not in that table — run the SQL below to add it.
INSERT INTO platform_admins (user_id)
VALUES ('<your-uuid>')
ON CONFLICT (user_id) DO NOTHING;
Admin Tasks
OpenRouter Summary
Returns the management-API summary for your OpenRouter account: credits balance and 30-day spend. Requires OPENROUTER_MANAGEMENT_API_KEY to be set in this environment. A 503 openrouter_key_not_configured response means that env var is missing.
Click "Load OpenRouter Summary" to view account balance and spend data.
Recent Usage Events
Returns the 50 most recent rows from usage_events in Supabase, ordered newest first. Each row is logged by a demo when a user runs a protected AI action. Fields include: user_id, demo_id, feature_id, openrouter_key_name, metadata (generation_id, model_used, status), and created_at. An empty rows: [] array means no usage events have been logged yet.
Click "Load Recent Usage Events" to view logged AI actions from demos.
Users & Invites
Create or attach a user by email, assign organization membership, and optionally grant platform admin access.
Load organizations, fill invite fields, then submit.