Admin Console
XAI Admin is a graphical configuration management console for owners, used to manage provider keys, system configuration, news broadcasts, and operation logs.
โ
Feature Overview
The XAI Admin console includes the following core functional modules:
- AI API Documentation - View supported AI service providers and SDK examples
- Model Services (Provider Management) - Manage upstream AI provider keys
- System Configuration - Configure model mapping, level mapping, resource allowlists, etc.
- Broadcast Notifications - Publish system-level or targeted user notifications
- Operation Logs - View all account operation records
โ
Access Control
- Owner Only: Only owner accounts (isOwner=true) can log in to the Admin console
- Local Key Storage: API Key is only stored in browser local storage, never uploaded to server
- Session Management: Login state is stored in browser, requires re-login after closing page
Feature Details
Common Task Guide
- Add upstream provider โ open โModel Servicesโ โ submit form โ API:
POST /x-keys
- View/filter providers โ โModel Servicesโ list โ
GET /x-keys
,GET /x-conf
- Configure Model Mapper โ โSystem Configurationโ โ
PUT /x-config
(MODEL_MAPPER
) - Configure Level Mapper โ โSystem Configurationโ โ
PUT /x-config
(LEVEL_MAPPER
) - Set Resources allowlist โ โSystem Configurationโ โ
PUT /x-config
(RESOURCES
) - Set Model Limits โ โSystem Configurationโ โ
PUT /x-config
(MODEL_LIMITS
) - Publish system/targeted news โ โBroadcast Notificationsโ โ
POST /x-news
/POST /x-news/{target}
- View operation logs โ โOperation Logsโ โ
GET /dashboard/logs
FeatureโEndpointโPermission Matrix
Feature | Primary Endpoints | Permission |
---|---|---|
Provider management | GET/POST/PUT/DELETE /x-keys , GET /x-conf | Owner only |
Owner config (Model/Level/Resources/Limits) | GET/PUT /x-config | Owner only |
News (system/targeted) | POST/DELETE /x-news , GET /dashboard/news | Owner only (system); Owner/ancestor (targeted) |
Operation logs | GET /dashboard/logs | Owner only |
Terminology: uses Model Mapper, Level Mapper, Resources (allowlist), Model Limits, Sleep, Switch Over โ see โTerminologyโ.
1. AI API Tab
Displays platform-supported AI service providers and SDK usage examples.
Features:
- Model List Link - Dynamic display of
/v1/models
endpoint link - Supported AI Service Providers - Shows 9 major AI services (OpenAI, Anthropic, Perplexity, Mistral, Grok, Gemini, Cohere, DeepSeek, AI21)
- SDK Example Code - Complete examples for OpenAI SDK and Anthropic SDK
- One-Click Copy - Example code supports one-click copy
Backend Endpoints:
/v1/models
- Get available model list
2. Model Services (Provider Management)
Manage upstream AI provider key pools with support for multiple provider types.
Features:
- Statistics Cards - Display total levels, total keys, active keys
- Add Provider - Support three configuration types:
- Standard configuration (OpenAI, Anthropic, etc.)
- Azure OpenAI configuration
- Google Vertex AI configuration
- Provider List - Display all providers grouped by level
- Edit/Delete Provider - Support modifying provider configuration or deletion
- Status Management - Enable/disable providers
Add Provider Form Fields:
Name
- Provider name (optional, for identification)Level
- Load pool level (required, for routing)Provider
- Upstream API URL (required)SecretKey
- API key (required)- Standard Config - No additional fields
- Azure Config - Model Mapping, API Version mapping
- Vertex Config - Base URL, Project ID, Client Email, Private Key
Backend Endpoints:
POST /x-keys
- Add new keyGET /x-keys
- Get key listPUT /x-keys/{id}
- Update keyDELETE /x-keys/{id}
- Delete key
3. System Configuration Tab
Manage owner-level system configuration parameters.
Configuration Items:
Basic Configuration:
XAI_MAIL
- System notification emailRESOURCES
- Allowed API resource paths (comma-separated)MODEL_LIMITS
- Model-level rate limits (JSON format)
Email Configuration:
EMAIL_SMTP
- SMTP server addressEMAIL_PORT
- SMTP portEMAIL_AUTH
- Authentication emailEMAIL_PASS
- Email passwordEMAIL_TLS
- Enable TLS (true/false)
Mapping Configuration:
MODEL_MAPPER
- System model mapping (format:source=target
)- Example:
gpt-3.5*=gpt-4o-mini,gpt-4=gpt-4o
- Purpose: Automatically convert requested models to other models
- Example:
LEVEL_MAPPER
- Model group mapping (format:model=level
)- Example:
gpt*=1,claude*=2,deepseek*=3
- Purpose: Specify which level's provider pool handles which models
- Example:
SWITCH_OVER
- Model group primary/backup switching (format:primary=backup
)- Example:
1=10,2=20
- Purpose: When primary level has >5 errors in 1 minute, auto-switch to backup level
- Example:
Backend Endpoints:
GET /x-config
- Get current configurationPUT /x-config
- Update configuration
4. Broadcast Notifications Tab
Publish system-level or targeted user notifications.
Features:
- Create Notification - Fill in title and content to publish notification
- Notification List - View historical notification records
- Delete Notification - Delete expired or incorrect notifications
Field Description:
title
- Notification title (required, max 100 characters)content
- Notification content (required, max 1000 characters)
Backend Endpoints:
POST /x-news
- Create system newsPOST /x-news/{target}
- Create targeted newsGET /dashboard/news
- Get news listDELETE /x-news
- Delete news
5. Operation Logs Tab
View all account operation records with pagination support.
Features:
- Log Table - Display time, action, target account, details, IP address
- Auto Pagination - Default 24 records per page
- Real-time Update - Auto refresh when entering tab
Backend Endpoints:
GET /dashboard/logs
- Get operation logs
โ
Use Cases
Use Case 1: Add Standard Provider
- Go to "Model Services" tab
- Fill in "Add Provider" form:
- Name:
OpenAI Production
- Level:
1
- Provider:
https://api.openai.com
- SecretKey:
sk-...
- Name:
- Click "Add Provider"
- System automatically adds
gpt*=1
mapping to LEVEL_MAPPER
Use Case 2: Configure Azure OpenAI
- Go to "Model Services" tab
- Select configuration type: "Azure OpenAI Configuration"
- Fill in basic info and Azure-specific config:
- Provider:
https://your-resource.openai.azure.com
- Model โ Deployment mapping:
{"gpt-4o": "gpt-4-deployment"}
- Provider:
- Click add
- System automatically handles Azure-specific request routing
Use Case 3: Set Model Mapping
- Go to "System Configuration" tab
- In "System Model Mapping" enter:
gpt-3.5*=gpt-4o-mini,o*=gpt-4o
- In "Model Group Mapping" enter:
gpt*=1,claude*=2,deepseek*=3
- Click "Save Configuration"
- System automatically applies new mapping rules
Use Case 4: Publish System Notification
- Go to "Broadcast Notifications" tab
- Fill in notification title and content:
- Title:
System Maintenance Notice
- Content:
System will undergo maintenance tomorrow 2:00-4:00 AM...
- Title:
- Click "Send Notification"
- All users will see this notification in Manage console
โ
Best Practices
Provider Management
- Group by Service - Put same service provider's keys in same level
- Set Backup Switching - Use SWITCH_OVER to configure backups for critical levels
- Regular Check Sleeping Keys - View sleeping status in provider list
- Reasonable Level Setting - Divide different levels by cost, speed, reliability
Configuration Management
- Model Mapping Purpose - Use for smooth migration or cost optimization
- Careful RESOURCES Modification - Wrong config may cause API access issues
- MODEL_LIMITS Restrictions - Set strict rate limits for expensive models
- Regular Config Backup - Use
/x-config
endpoint to export configuration
Notification Management
- Important Notifications First - Use system-level notifications for critical information
- Concise Content - Avoid overly long notification content
- Timely Cleanup - Delete expired or invalid notifications
โ
FAQ
Q: Why can't I log in to Admin console?
A: Only owner accounts can log in to Admin console. Sub-accounts should use Manage console.
Q: Models still can't be used after adding Provider?
A: Check the following:
- Does LEVEL_MAPPER include mapping for this model
- Is Provider status enabled
- Is SecretKey valid
Q: How to view system auto-added LEVEL_MAPPER?
A: You can view and modify in "System Configuration" tab's "Model Group Mapping" field.
Q: Is Azure config's API Version mapping required?
A: No, it's optional. If left empty, system will use default versions configured in environment variables.
Q: How to backup my configuration?
A: Use the following command to export configuration:
curl -H "Authorization: Bearer $API_KEY" \
https://api.xaixapi.com/x-config > config-backup.json
โ
Related Documentation
- Keys Management API - Provider management backend API
- System Configuration API - Configuration management backend API
- Manage Console - User management console
- Quick Start - Basic getting started guide