Manage Console

XAI Manage is a graphical console for end users or authorized administrators, providing account status, credits, usage, billing, logs, and news viewing, along with common self-service capabilities (such as key rotation and sub-account management).

β€”

Feature Overview

The XAI Manage console includes the following core functional modules:

  1. Usage Statistics (Dashboard) - View today's real-time usage, specific dates, and time range usage analysis
  2. Account Query - Batch query sub-account information
  3. AI API Documentation - View supported AI service providers and SDK examples
  4. Create Sub-Account - Create new sub-accounts under your account
  5. Account Top-up - Top up or deduct credits for sub-accounts
  6. View Sub-Accounts - View all sub-account lists
  7. Update Sub-Account - Modify sub-account configuration and limits
  8. Delete Sub-Account - Delete sub-accounts and refund balance
  9. Operation Logs - View account operation records
  10. System Configuration - Jump to Admin console (owner only)

β€”

Access Control

  • All Users Can Access: Any user with a valid API Key can log in to Manage console
  • Local Key Storage: API Key is only stored in browser localStorage, never uploaded to server
  • Session Cache: User info cached in sessionStorage (24 hours), requires re-fetch after closing tab
  • News Cache: News data cached locally for 1 hour, supports "don't show again today" feature

Feature Details

Common Task Guide

  • View today/history usage β†’ β€œUsage Statistics” β†’ GET /dashboard/bill (date / start-end / days)
  • Batch query sub-accounts β†’ β€œAccount Query” β†’ GET /x-users/{identifier} / GET /x-users / GET /x-dna
  • Create sub-account β†’ β€œCreate Sub-Account” β†’ POST /x-users
  • Top-up/refund β†’ β€œAccount Top-up” β†’ PUT /x-users/{identifier} (CreditGranted / Days)
  • Constrain access scope β†’ β€œUpdate Sub-Account” β†’ PUT /x-users/{identifier} (AllowModels / AllowIPs / Resources)
  • Set per-model limits β†’ β€œUpdate Sub-Account” β†’ PUT /x-users/{identifier} (ModelLimits)
  • View operation logs β†’ β€œOperation Logs” β†’ GET /dashboard/logs

Feature–Endpoint–Permission Matrix

FeaturePrimary EndpointsPermission
Usage dashboardGET /dashboard/bill, GET /dashboard/status, GET /dashboard/infoAny valid user
Sub-account list/queryGET /x-users, GET /x-users/{identifier}, GET /x-dnaParent/ancestor only
Create sub-accountPOST /x-usersParent/owner only (with sufficient balance/limits)
Update sub-accountPUT /x-users/{identifier}Parent/owner only
Delete sub-accountDELETE /x-users/{identifier}Parent/owner only
Operation logsGET /dashboard/logsAny valid user (own logs); scope may be restricted
NewsGET /dashboard/newsAny valid user

Terminology: Level, Model Mapper, Level Mapper, Resources (allowlist), Model Limits β€” see β€œTerminology”.

1. Usage Statistics Tab

Real-time viewing and analysis of account usage data with multiple time dimensions and metric switching.

Features:

  • Today's Real-time Usage - Display today's requests, tokens, and cost
  • Specific Date Query - Select a specific date to view that day's usage
  • Time Range Query - Select start and end dates to view interval usage
  • Metric Switching - Switch between cost, requests, and tokens
  • Chart Display - Usage trend charts (if multiple days of data)
  • Model Usage Details - View detailed usage distribution by model

Operation Steps:

  1. Default displays today's real-time usage
  2. Select "Specific Date" and choose a date to view single-day usage
  3. Select "Time Range" and set start/end dates to view interval usage
  4. Use metric switch buttons to switch between different dimensions

Backend Endpoints:

  • GET /dashboard/bill - Get usage data
  • Query parameters: date (single day), start/end (range), days (past N days)

2. Account Query Tab

Batch query detailed information for sub-accounts.

Features:

  • Batch Query - Input multiple account identifiers, separated by commas or newlines
  • Support Multiple Identifiers - ID, Name, Email, DNA path, etc.
  • Detailed Info Display - Show account balance, limits, usage, and complete information
  • Result Export - Copy query results

Identifier Types:

  • User ID: 42
  • Username: prod-account
  • Email: [email protected]
  • DNA path: .1.42.
  • Level filter: L2 (all level 2 users)

Backend Endpoints:

  • GET /x-users/{identifier} - Query single or batch users

3. AI API Documentation Tab

Same as Admin console, displays supported AI service providers and SDK example code.

Features:

  • Model list link
  • Supported AI service providers display
  • OpenAI and Anthropic SDK example code
  • One-click copy functionality

4. Create Sub-Account Tab

Create new sub-accounts under your account.

Features:

  • Complete Creation Form - Include all required and optional fields
  • Real-time Validation - Real-time validation of field formats and values
  • Flexible Configuration - Support setting limits, rate limits, allowlists, etc.

Form Fields:

Basic Info (Required):

  • Name - Account name (4-63 characters, at least 1 letter)
  • Email - Email address
  • CreditGranted - Initial top-up amount (minimum $2)

Optional Config:

  • Alias - Display name
  • BillingEmail - Billing email
  • Rates - Rate multiplier (must be β‰₯ parent rate)
  • Days - Balance validity period in days

Limit Settings:

  • HardLimit - Monthly hard limit
  • SoftLimit - Monthly soft limit (email alert when reached)
  • AutoQuota - Auto quota

Rate Limits:

  • RPM/RPH/RPD - Requests per minute/hour/day limits
  • TPM/TPH/TPD - Tokens per minute/hour/day limits

Access Control:

  • AllowIPs - IP allowlist (comma-separated)
  • AllowModels - Model allowlist (supports wildcards like gpt-4*)
  • Resources - API endpoint allowlist

Model Limits:

  • Set independent rate limits for specific models (JSON format)

Backend Endpoints:

  • POST /x-users - Create sub-account

5. Account Top-up Tab

Top up or deduct credits for sub-accounts.

Features:

  • Account Selection - Input user ID, Name, or Email
  • Top-up/Deduction - Positive for top-up, negative for deduction
  • Custom Validity - Set balance validity period in days
  • Batch Operations - Support simultaneous operations for multiple accounts

Operation Instructions:

  1. Input target account identifier
  2. Input amount:
    • Positive (e.g., 100) means top up $100
    • Negative (e.g., -50) means deduct $50
  3. Optional: Set validity period days (default 180 days)
  4. Submit operation

Backend Endpoints:

  • PUT /x-users/{identifier} - Update user (including top-up/deduction)
  • Request body: {"CreditGranted": 100, "Days": 30}

6. View Sub-Accounts Tab

View list and detailed information of all direct sub-accounts.

Features:

  • Account List - Display all sub-accounts
  • Key Information - ID, Name, Email, Balance, Status
  • Filter and Search - Filter accounts by conditions
  • Quick Actions - Click account to view details or perform actions

Backend Endpoints:

  • GET /x-users - Get all direct sub-accounts
  • GET /x-dna - Get all descendant accounts

7. Update Sub-Account Tab

Modify existing sub-account configuration and limits.

Features:

  • Complete Update Form - Similar to creation form but supports partial updates
  • Status Management - Enable/disable accounts
  • Config Modification - Modify limits, rates, allowlists, etc.
  • Model Limits - Update model-level rate limits

Updatable Fields:

All optional fields from creation can be updated, plus:

  • Status - Enable/disable account (true/false)
  • CreditGranted - Top-up/deduction
  • Days - Balance validity
  • Incremental modification of limits, rates, allowlists

Special Operations:

  • Reset allowlist: AllowModels: "*"
  • Remove from allowlist: AllowModels: "-gpt-3.5-turbo"

Backend Endpoints:

  • PUT /x-users/{identifier} - Update user

8. Delete Sub-Account Tab

Delete sub-accounts and refund remaining balance to parent account.

Features:

  • Account Selection - Input account identifier to delete
  • Balance Refund - Automatically refund remaining balance to parent account
  • Transaction Fee - Deduct $0.2 handling fee
  • Confirmation Mechanism - Prevent accidental deletion

Important Notes:

  • Remaining balance automatically refunded to parent account
  • Deduct $0.2 transaction handling fee
  • Refunded balance default validity 180 days
  • Cannot be recovered after deletion

Backend Endpoints:

  • DELETE /x-users/{identifier} - Delete user

9. Operation Logs Tab

View current account's operation logs.

Features:

  • Log List - Display time, operation, target, details, IP
  • Paginated Browsing - Support paginated viewing of historical logs
  • Filter Functionality - Filter by operation type, status, etc.

Backend Endpoints:

  • GET /dashboard/logs - Get operation logs

10. System Configuration Entry

Owners can see "Configuration Management" link, clicking jumps to Admin console.

β€”

News Banner Feature

Manage console top displays system news and user notifications.

Features:

  • Priority Display - System news > User news > DNA news
  • Don't Show Today - Close and won't show again today
  • Auto Carousel - Multiple news items auto-rotate
  • Local Cache - News cached for 1 hour, reducing requests

Backend Endpoints:

  • GET /dashboard/news - Get news list

β€”

Use Cases

Use Case 1: View Today's Usage

  1. After login, default displays "Usage Statistics" tab
  2. Page automatically shows today's real-time usage:
    • Today's requests
    • Today's tokens
    • Today's cost
  3. View detailed model usage distribution

Use Case 2: Create Development Environment Sub-Account

  1. Go to "Create Sub-Account" tab
  2. Fill in basic info:
  3. Set limits:
    • HardLimit: 50 (max $50 monthly spend)
    • SoftLimit: 40 (email alert at $40)
    • RPM: 30 (max 30 requests per minute)
  4. Set allowlist:
    • AllowModels: gpt-4o-mini claude-3-haiku* (only allow these models)
  5. Submit creation
  6. System returns new account's API Key

Use Case 3: Top Up Sub-Account

  1. Go to "Account Top-up" tab
  2. Input sub-account name: dev-env-001
  3. Input top-up amount: 50
  4. Set validity: 30 days
  5. Submit operation
  6. System confirms successful top-up

Use Case 4: Update Sub-Account Limits

  1. Go to "Update Sub-Account" tab
  2. Input account identifier: dev-env-001
  3. Modify config:
    • RPM: 60 (increase rate limit)
    • AllowModels: gpt-4* claude-* (expand model allowlist)
  4. Submit update
  5. System confirms successful update
  1. Go to "Usage Statistics" tab
  2. Select "Time Range"
  3. Set date range: 2025-01-01 to 2025-01-31
  4. Switch metrics to view:
    • Cost trends
    • Request trends
    • Token usage trends
  5. View usage distribution by model

β€”

Best Practices

Account Management

  1. Tiered Management - Create independent accounts for different environments (dev/test/prod)
  2. Reasonable Limits - Set SoftLimit and HardLimit to avoid unexpected overspending
  3. Model Allowlist - Restrict sub-accounts to specific models only
  4. Regular Audit - Regularly review sub-account lists and usage

Top-up Management

  1. Top Up As Needed - Don't top up too much at once
  2. Set Validity - Set shorter validity for test accounts
  3. Retain Balance - Deduct before deleting accounts to reclaim balance

Usage Monitoring

  1. Daily Check - Check today's usage to avoid anomalies
  2. Trend Analysis - Regularly analyze usage trends to optimize costs
  3. Model Optimization - Choose appropriate models based on usage data

β€”

FAQ

Q: Why can't I see "System Configuration" entry?

A: Only owners can see "Configuration Management" entry. Sub-accounts can only manage their own sub-accounts.

Q: What's the minimum top-up amount when creating sub-accounts?

A: Minimum top-up amount is $2 (CreditGranted β‰₯ 2).

Q: How to restrict sub-accounts to specific models only?

A: When creating or updating sub-accounts, set the AllowModels field. Supports wildcards like gpt-4* claude-3-haiku*.

Q: Can sub-account rates be lower than parent account?

A: No. Sub-account Rates must be greater than or equal to parent account rates.

Q: How is balance handled after deleting sub-accounts?

A: Remaining balance automatically refunded to parent account, minus $0.2 handling fee, with 180-day validity.

Q: Why am I being charged when querying usage?

A: Query spans >30 days charge $0.01, >365 days charge $0.05 and truncate to one year.

Q: How to batch query multiple sub-accounts?

A: In "Account Query" tab input multiple identifiers, separated by commas or newlines, like:

dev-env-001
prod-account
[email protected]
42

β€”