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 β see Admin API: Add Key
- View/filter providers β "Model Services" list β see Admin API: Query Keys
- Configure Model Mapper β "System Configuration" β see Admin API: System Configuration
- Configure Level Mapper β "System Configuration" β see Admin API: System Configuration
- Set Resources allowlist β "System Configuration" β see Admin API: System Configuration
- Set Model Limits β "System Configuration" β see Admin API: System Configuration
- Publish system/targeted news β "Broadcast Notifications" β see Admin API: Broadcast Notifications
- View operation logs β "Operation Logs" β see Manage API: Operation Logs
FeatureβEndpointβPermission Matrix
Complete API endpoints and usage can be found in Admin API Reference
| Feature | API Documentation | Permission |
|---|---|---|
| Provider management | Admin API: Provider Key Management | Owner only |
| Owner config (Model/Level/Resources/Limits) | Admin API: System Configuration | Owner only |
| News (system/targeted) | Admin API: Broadcast Notifications | Owner only (system); Owner/ancestor (targeted) |
| Operation logs | Manage API: Operation 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/modelsendpoint 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
Related API: See Manage API: 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
Related API: See Admin API: Provider Key Management
3. System Configuration Tab
Manage owner-level system configuration parameters.
Configuration Items:
Owner Pricing Overrides:
- A
PRICINGeditor is available at the top of the tab (provide only deltas from system defaults). - Actions:
- βLoad Currentβ reads
configs.PRICINGfrom backend - βSave Pricing (Apply Now)β writes
PRICINGviaPUT /x-config - βClear (Restore Defaults)β removes
PRICINGviaDELETE /x-config
- βLoad Currentβ reads
- Constraints: JSON size β€ 128k, total entries β€ 1024; unknown fields are rejected; all numbers must be finite and nonβnegative.
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 password
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:
Related API: See Admin API: System 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)
Related API: See Admin API: Broadcast Notifications
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
Related API: See Manage API: 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*=1mapping 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-configendpoint 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
- Admin API Reference - Complete Admin Console API documentation
- Manage API Reference - Dashboard and usage query API
- Manage Console - User management console
- Quick Start - Basic getting started guide