Admin Panel
The Admin panel provides tenant and user management for administrators.

Overview
The Admin panel enables:
- Tenant management for multi-tenant deployments
- API key management for access control
- User management for team collaboration
- System monitoring for operational oversight
Access Required
The Admin panel requires administrator privileges. Regular users will not see this option in the navigation.
Access Levels
Role Hierarchy
| Role | Capabilities |
|---|---|
| User | Generate, edit, manage own content |
| Admin | + View all tenant data, manage keys |
| Super Admin | + Create tenants, manage users, full system access |
Authentication
Admin access requires:
- Valid API key with admin role, OR
- Control plane login with admin credentials
┌─────────────────────────────────────────────────────┐
│ Admin Authentication │
├─────────────────────────────────────────────────────┤
│ │
│ Enter Admin Token: │
│ ┌─────────────────────────────────────────────────┐ │
│ │ •••••••••••••••••••••••••••• │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [Authenticate] │
│ │
└─────────────────────────────────────────────────────┘Tenant Management
Tenants List
┌─────────────────────────────────────────────────────────────┐
│ Tenants [🔍 Search] [+ New] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 🏢 Creative Studio Active │ │
│ │ ID: tenant_abc123 │ │
│ │ Created: Jan 1, 2024 • Keys: 3 • Users: 5 │ │
│ │ Storage: 856 MB / 1 GB │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 🏢 Marketing Agency Active │ │
│ │ ID: tenant_def456 │ │
│ │ Created: Jan 5, 2024 • Keys: 2 • Users: 3 │ │
│ │ Storage: 423 MB / 2 GB │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 🏢 Test Account Suspended │ │
│ │ ID: tenant_ghi789 │ │
│ │ Created: Jan 10, 2024 • Keys: 1 • Users: 1 │ │
│ │ Storage: 0 MB / 500 MB │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘Create Tenant
┌─────────────────────────────────────────────────────┐
│ Create New Tenant [×] │
├─────────────────────────────────────────────────────┤
│ Tenant Name * │
│ ┌─────────────────────────────────────────────────┐ │
│ │ New Creative Studio │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Provider Keys (at least one required) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Gemini AIza... [Test] │ │
│ │ OpenAI sk-... [Test] │ │
│ └─────────────────────────────────────────────────┘ │
│ 🔒 Each key encrypted independently with AES-GCM │
│ │
│ Allowed Models │
│ ┌─────────────────────────────────────────────────┐ │
│ │ ☑ gemini-flash-lite-image (default) │ │
│ │ ☑ gemini-flash-image │ │
│ │ ☑ gemini-pro-image │ │
│ │ ☐ openai-gpt-image-2 │ │
│ │ ☐ openai-gpt-image-2.5-flare │ │
│ │ ☐ openai-gpt-image-2.5-sunburst │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ ─────────────── Quotas ─────────────── │
│ │
│ Monthly Storage (MB) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ 1024 │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Rate Limit (requests/minute) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ 60 │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [Cancel] [Create Tenant] │
└─────────────────────────────────────────────────────┘Tenant Detail
┌─────────────────────────────────────────────────────────────┐
│ Creative Studio [Edit] [Suspend] │
├─────────────────────────────────────────────────────────────┤
│ │
│ Tenant Information │
│ ───────────────── │
│ ID: tenant_abc123 │
│ Status: Active │
│ Created: January 1, 2024 │
│ │
│ Quotas │
│ ────── │
│ Storage: 856 MB / 1,024 MB (83.6%) │
│ ████████████████████░░░░ │
│ │
│ Rate Limit: 60 requests/minute │
│ │
│ Statistics │
│ ────────── │
│ Total Images: 1,523 │
│ Total Sessions: 245 │
│ Characters: 12 │
│ Products: 8 │
│ Style Presets: 5 │
│ │
│ API Keys (3) [+ New Key] │
│ ──────────── │
│ sk_live_abc... (Created Jan 1) [Active] [Revoke] │
│ sk_live_def... (Created Jan 5) [Active] [Revoke] │
│ sk_test_xyz... (Created Jan 10) [Active] [Revoke] │
│ │
└─────────────────────────────────────────────────────────────┘Edit Tenant
┌─────────────────────────────────────────────────────┐
│ Edit Tenant: Creative Studio [×] │
├─────────────────────────────────────────────────────┤
│ Tenant Name │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Creative Studio │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Provider Keys (leave blank to keep current) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Gemini ••••••••••••• (configured) [Replace] │ │
│ │ OpenAI not configured [Add Key] │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Allowed Models │
│ ┌─────────────────────────────────────────────────┐ │
│ │ ☑ gemini-flash-lite-image (default) │ │
│ │ ☑ gemini-flash-image ☑ gemini-pro-image │ │
│ │ ☐ openai-gpt-image-2 │ │
│ │ ☐ openai-gpt-image-2.5-flare │ │
│ │ ☐ openai-gpt-image-2.5-sunburst │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Monthly Storage (MB) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ 2048 │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Rate Limit (requests/minute) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ 120 │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [Cancel] [Save Changes] │
└─────────────────────────────────────────────────────┘API Key Management
Create API Key
┌─────────────────────────────────────────────────────┐
│ Create API Key [×] │
├─────────────────────────────────────────────────────┤
│ Tenant: Creative Studio │
│ │
│ Key Type │
│ ● Live (sk_live_...) │
│ ○ Test (sk_test_...) │
│ │
│ Description (optional) │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Production API access │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [Create Key] │
└─────────────────────────────────────────────────────┘New Key Display
WARNING
Copy your API key now. It will not be shown again.
┌─────────────────────────────────────────────────────┐
│ API Key Created │
├─────────────────────────────────────────────────────┤
│ │
│ Your new API key: │
│ ┌─────────────────────────────────────────────────┐ │
│ │ sk_live_abc123xyz789def456ghi... │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [📋 Copy to Clipboard] │
│ │
│ ⚠️ Store this key securely. It will not be shown │
│ again and cannot be retrieved. │
│ │
│ [Done] │
└─────────────────────────────────────────────────────┘Revoke Key
┌─────────────────────────────────────────────────────┐
│ Revoke API Key? │
├─────────────────────────────────────────────────────┤
│ Are you sure you want to revoke this API key? │
│ │
│ Key: sk_live_abc... │
│ Created: January 1, 2024 │
│ Last Used: January 15, 2024 │
│ │
│ ⚠️ This action is immediate and cannot be undone. │
│ Any applications using this key will lose │
│ access immediately. │
│ │
│ [Cancel] [Revoke Key] │
└─────────────────────────────────────────────────────┘User Management
Users List (Super Admin)
┌─────────────────────────────────────────────────────────────┐
│ Users [🔍 Search] [+ Invite] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 👤 admin@company.com Super Admin │ │
│ │ Tenant: Creative Studio │ │
│ │ Created: Jan 1, 2024 • Last login: 2 hours ago │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 👤 user@company.com Admin │ │
│ │ Tenant: Creative Studio │ │
│ │ Created: Jan 5, 2024 • Last login: 1 day ago │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ 👤 designer@company.com User │ │
│ │ Tenant: Creative Studio │ │
│ │ Created: Jan 10, 2024 • Last login: 3 days ago │ │
│ └─────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘Invite User
┌─────────────────────────────────────────────────────┐
│ Invite User [×] │
├─────────────────────────────────────────────────────┤
│ Email Address * │
│ ┌─────────────────────────────────────────────────┐ │
│ │ newuser@company.com │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ Tenant │
│ [Creative Studio ▼] │
│ │
│ Role │
│ ● User (standard access) │
│ ○ Admin (tenant management) │
│ ○ Super Admin (full system access) │
│ │
│ [Send Invitation] │
└─────────────────────────────────────────────────────┘Edit User
┌─────────────────────────────────────────────────────┐
│ Edit User: user@company.com [×] │
├─────────────────────────────────────────────────────┤
│ Email: user@company.com │
│ │
│ Role │
│ ○ User │
│ ● Admin │
│ ○ Super Admin │
│ │
│ Status │
│ ● Active │
│ ○ Suspended │
│ │
│ [Cancel] [Save Changes] │
└─────────────────────────────────────────────────────┘System Monitoring
Overview Dashboard
┌─────────────────────────────────────────────────────────────┐
│ System Overview │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Tenants │ │ Users │ │ Images │ │
│ │ 12 │ │ 45 │ │ 15,234 │ │
│ │ +2 this mo │ │ +8 this mo │ │ +3,421 mo │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Storage │ │ API Calls │ │ Errors │ │
│ │ 8.5 GB │ │ 125,432 │ │ 23 │ │
│ │ of 20 GB │ │ this month │ │ this week │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘Usage by Tenant
┌─────────────────────────────────────────────────────────────┐
│ Usage by Tenant (Last 30 Days) │
├─────────────────────────────────────────────────────────────┤
│ │
│ Creative Studio ████████████████████████ 3,421 images │
│ Marketing Agency ████████████████ 2,156 images │
│ Design Team ████████████ 1,543 images │
│ Test Account ██ 234 images │
│ │
│ Total: 7,354 images │
│ │
└─────────────────────────────────────────────────────────────┘Error Log
┌─────────────────────────────────────────────────────────────┐
│ Recent Errors [View All] │
├─────────────────────────────────────────────────────────────┤
│ │
│ ⚠️ Rate limit exceeded 2 hours ago │
│ Tenant: Creative Studio • Key: sk_live_abc... │
│ │
│ ❌ Gemini API error: 429 5 hours ago │
│ Tenant: Marketing Agency • Key: sk_live_def... │
│ │
│ ⚠️ Storage quota warning (90%) 1 day ago │
│ Tenant: Creative Studio │
│ │
└─────────────────────────────────────────────────────────────┘Tenant Actions
Suspend Tenant
┌─────────────────────────────────────────────────────┐
│ Suspend Tenant? │
├─────────────────────────────────────────────────────┤
│ Are you sure you want to suspend "Test Account"? │
│ │
│ Effects: │
│ • All API keys will be disabled │
│ • Users cannot log in │
│ • Images remain stored but inaccessible │
│ │
│ Reason (optional): │
│ ┌─────────────────────────────────────────────────┐ │
│ │ Billing issue │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [Cancel] [Suspend Tenant] │
└─────────────────────────────────────────────────────┘Reactivate Tenant
┌─────────────────────────────────────────────────────┐
│ Reactivate Tenant? │
├─────────────────────────────────────────────────────┤
│ Reactivate "Test Account"? │
│ │
│ This will: │
│ • Re-enable all API keys │
│ • Allow user logins │
│ • Restore access to images │
│ │
│ [Cancel] [Reactivate Tenant] │
└─────────────────────────────────────────────────────┘Delete Tenant
Irreversible Action
Deleting a tenant permanently removes all data including images, characters, products, and sessions.
┌─────────────────────────────────────────────────────┐
│ Delete Tenant? │
├─────────────────────────────────────────────────────┤
│ ⚠️ DANGER: This action cannot be undone! │
│ │
│ Deleting "Test Account" will permanently remove: │
│ • 234 images (0 MB) │
│ • 12 sessions │
│ • 2 characters │
│ • 1 product reference │
│ • 1 API key │
│ • 1 user account │
│ │
│ Type "Test Account" to confirm: │
│ ┌─────────────────────────────────────────────────┐ │
│ │ │ │
│ └─────────────────────────────────────────────────┘ │
│ │
│ [Cancel] [Delete Tenant] │
└─────────────────────────────────────────────────────┘API Access
Admin functions are also available via REST API:
bash
# List tenants
curl -H "X-Admin-Token: your_admin_token" \
https://api.example.com/admin/tenants
# Create tenant
curl -X POST -H "X-Admin-Token: your_admin_token" \
-H "Content-Type: application/json" \
-d '{"name": "New Tenant", "providerCredentials": {"gemini": "AIza...", "openai": "sk-..."}, "allowedModels": ["gemini-flash-lite-image", "gemini-flash-image", "gemini-pro-image", "openai-gpt-image-2", "openai-gpt-image-2.5-flare", "openai-gpt-image-2.5-sunburst"], "model_id": "gemini-flash-lite-image"}' \
https://api.example.com/admin/tenants
# Create API key
curl -X POST -H "X-Admin-Token: your_admin_token" \
-H "Content-Type: application/json" \
-d '{"type": "live"}' \
https://api.example.com/admin/tenants/tenant_abc123/api-keysSee Admin API → for complete documentation.
Security Best Practices
Admin Token Management
- Rotate regularly - Change admin tokens periodically
- Use environment variables - Never hardcode tokens
- Limit distribution - Only share with necessary personnel
- Audit access - Review admin actions regularly
API Key Security
- Use test keys for development - Keep live keys for production
- Revoke compromised keys immediately - Don't wait
- Monitor usage patterns - Look for anomalies
- Set appropriate quotas - Prevent runaway usage