Admin Dashboard Overview¶
The SaaS LiteLLM Admin Dashboard is a Next.js web application for managing your platform, organizations, teams, and model access.
What is the Admin Dashboard?¶
The Admin Dashboard provides a user-friendly interface for platform administrators to:
- ✅ Create and manage organizations
- ✅ Create and manage teams with virtual keys
- ✅ Configure model access groups
- ✅ Define model aliases with pricing
- ✅ Allocate and monitor credits
- ✅ Suspend and resume teams
- ✅ Monitor usage and costs
Access URL (Local): http://localhost:3002
Access URL (Production): https://your-admin-dashboard.com
Screenshots¶
First-Time Setup¶
Create your first admin account with the owner role
Dashboard Overview¶
Monitor your LiteLLM infrastructure at a glance
Organizations Management¶
Create and manage customer organizations
Teams Management¶
Manage teams, credits, and virtual API keys
Model Access Groups¶
Control which models teams can access
Model Aliases¶
Create semantic model names with pricing configuration
Built on LiteLLM
The Admin Dashboard manages the SaaS layer built on top of LiteLLM. It provides a UI for features like job-based cost tracking and multi-tenant architecture that SaaS LiteLLM adds to the core LiteLLM routing capabilities.
Key Features¶
🏢 Organization Management¶
- Create top-level organizations
- Manage organization metadata
- View all teams in an organization
- Track organization-level usage
Learn more about organizations
👥 Team Management¶
- Create teams within organizations
- Generate virtual API keys automatically
- Assign model access groups to teams
- Set credit allocations
- Suspend/resume teams
- View team statistics
🔐 Model Access Control¶
- Define model access groups (e.g., "gpt-models", "claude-models")
- Assign model aliases to access groups
- Control which teams can access which models
- Flexible permission system
Learn more about model access groups
🎯 Model Aliases¶
- Create semantic model names (e.g., "ChatAgent" → "gpt-4")
- Configure pricing per model (input/output tokens)
- Provider configuration
- Fallback routing
Learn more about model aliases
💳 Credit Management¶
- Allocate credits to teams
- Monitor credit usage
- Track credit transactions
- Set budget modes (job-based, consumption-based)
- Low credit alerts
📊 Monitoring & Analytics¶
- Real-time usage statistics
- Cost tracking per team
- Job monitoring
- Team activity logs
- Usage trends
Starting the Dashboard¶
Local Development¶
cd admin-dashboard
# Install dependencies (first time only)
npm install
# Start development server
npm run dev
The dashboard will be available at: http://localhost:3002
Production Deployment¶
Deploy to Vercel, Netlify, or any Node.js hosting:
Dashboard Architecture¶
graph TD
A[Admin Dashboard :3002] -->|HTTP/JSON| B[SaaS API :8003]
B --> C[PostgreSQL Database]
A -.Manage.-> D[Organizations]
A -.Manage.-> E[Teams]
A -.Manage.-> F[Model Access Groups]
A -.Manage.-> G[Model Aliases]
A -.Monitor.-> H[Usage & Costs]
D --> C
E --> C
F --> C
G --> C
H --> C
style A fill:#9C27B0
style B fill:#4CAF50
style C fill:#FF9800 Components: - Admin Dashboard (Next.js) - Web UI on port 3002 - SaaS API - Backend REST API on port 8003 - PostgreSQL - Data storage
Common Workflows¶
Workflow 1: Onboard a New Customer¶
- Create Organization
- Navigate to Organizations → Create
- Enter organization name and metadata
-
Save organization
-
Create Model Access Group (if needed)
- Navigate to Model Access → Create Group
- Define which models this customer can access
-
Assign model aliases
-
Create Team
- Navigate to Teams → Create
- Select the organization
- Assign access groups
- Allocate initial credits
-
Save and copy the virtual key
-
Share Virtual Key
- Provide virtual key to customer securely
- Customer can now make API calls
Workflow 2: Monitor Team Usage¶
- View Team List
- Navigate to Teams
-
See all teams with current status
-
Check Team Details
- Click on a team
- View credits remaining
- See recent jobs
-
Check usage statistics
-
Add Credits (if needed)
- Click "Add Credits"
- Enter amount
- Confirm transaction
Workflow 3: Suspend a Team¶
- Navigate to Team
- Find the team in Teams list
-
Click team name
-
Suspend Team
- Click "Suspend" button
- Confirm suspension
-
Team can no longer make API calls
-
Resume Team (when ready)
- Click "Resume" button
- Team access restored
Learn more about suspend/resume
Dashboard Sections¶
Organizations Section¶
Path: /organizations
- List all organizations
- Create new organizations
- View organization details
- List teams in organization
- Organization usage statistics
Teams Section¶
Path: /teams
- List all teams
- Create new teams
- View team details
- Manage virtual keys
- Add/remove credits
- Suspend/resume teams
- View team usage
Model Access Section¶
Path: /model-access
- List access groups
- Create access groups
- Assign model aliases
- Manage permissions
Model Aliases Section¶
Path: /model-aliases
- List all model aliases
- Create new aliases
- Configure pricing
- Provider settings
Monitoring Section¶
Path: /monitoring
- Dashboard overview
- Usage statistics
- Cost tracking
- Job monitoring
- Team activity
Configuration¶
Environment Variables¶
Create .env.local in the admin-panel/ directory:
# SaaS API URL (required)
NEXT_PUBLIC_API_URL=http://localhost:8003
# Note: MASTER_KEY is entered by users at login,
# not stored in this file
API Connection¶
The dashboard connects to the SaaS API to: - Fetch data (organizations, teams, etc.) - Create/update/delete resources - Monitor usage and costs
All API calls are authenticated (implementation depends on your auth strategy).
Security Considerations¶
Authentication¶
The Admin Dashboard uses MASTER_KEY authentication to protect administrative endpoints.
How it works: 1. Users enter their MASTER_KEY on the login page 2. Dashboard validates key by making test request to /api/model-groups 3. Valid key is stored in localStorage 4. All API requests include X-Admin-Key header with the key
Setting up:
Local Development:
Production (Railway):
Generate secure keys:
Network Security¶
Production Best Practices:
- HTTPS Only - Always use HTTPS in production
- VPN Access - Restrict dashboard to VPN network
- IP Whitelist - Limit access to specific IPs
- Rate Limiting - Prevent brute force attacks
- Audit Logging - Log all admin actions
- CORS Configuration - Add production admin panel URL to CORS
CORS Configuration Required
The admin panel is browser-based, so it requires CORS configuration in the SaaS API.
You must add your production admin panel URL to the allow_origins list in src/saas_api.py.
Data Protection¶
- Don't expose virtual keys in logs
- Mask sensitive data in UI
- Implement RBAC if multiple admins
- Regular security audits
Troubleshooting¶
Dashboard Won't Start¶
Problem: npm run dev fails
Solutions:
# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm install
# Check Node.js version (should be 16+)
node --version
# Try with clean cache
npm cache clean --force
npm install
Can't Connect to API¶
Problem: Dashboard shows "API connection failed"
Solutions: 1. Verify SaaS API is running: curl http://localhost:8003/health 2. Check NEXT_PUBLIC_API_URL in .env.local 3. Check browser console for CORS errors 4. Verify firewall isn't blocking port 8003
Data Not Loading¶
Problem: Lists show empty or "Loading..."
Solutions: 1. Check browser network tab for API errors 2. Verify database has data 3. Check SaaS API logs for errors 4. Ensure PostgreSQL is running
Keyboard Shortcuts¶
| Shortcut | Action |
|---|---|
Ctrl/Cmd + K | Search |
G + O | Go to Organizations |
G + T | Go to Teams |
G + M | Go to Monitoring |
N | Create New (on list pages) |
? | Show help |
Next Steps¶
Now that you understand the dashboard overview:
- Set Up Organizations - Create your first organization
- Create Teams - Set up teams with virtual keys
- Configure Model Access - Control model access
- Manage Credits - Allocate credits to teams
- Monitor Usage - Track usage and costs
Additional Resources¶
- API Reference - Backend API documentation
- Integration Guide - How teams integrate
- Troubleshooting - Common issues