Account and Usage API
Account and Usage API
export XSI_BASE_URL="https://api.xsicontrol.com" # Or your own API domain
export XSI_API_KEY="sk-Xvs..."Endpoints at a glance
| Method and path | Scope | Permission | Description |
|---|---|---|---|
GET /dashboard/status | Current account | Any account | Identity, balance and capability flags |
GET /dashboard/info | Current account | Any account | Configuration, limits and credit details |
GET /dashboard/live | Current account | Any account | info plus live usage for the current day and month |
GET /dashboard/bill | Current account | Any account | Bills by date with per-model breakdown |
GET /dashboard/logs | Management actions of the current account | Manager | Activity log |
GET /dashboard/news | Current account | Any account | System, group and personal notifications |
GET /x-bill | Descendants | Manager | Aggregated bill and account rankings |
/dashboard/*shares the model-call endpoint and acceptsAuthorization,x-api-keyorx-goog-api-key;/x-billaccepts onlyAuthorization.- When an account is suspended for insufficient balance or exceeds its daily/monthly credit limit, GET
/dashboard/*remains available so you can see why. - There is also
GET /dashboard/models(the same model catalog as/v1/models, but still accessible when the account is frozen or over quota). Other/dashboard/*paths return404./dashboard/*has no/v1form.
Account status
curl "$XSI_BASE_URL/dashboard/status" -H "Authorization: Bearer $XSI_API_KEY"| Field | Description |
|---|---|
object | Always user_status |
id, name, alias, email, dna | Account identifiers and lineage path in the account tree |
public_key | Public identifier (pk-Xvs...), used for referral signups and similar |
balance | Current available balance (CNY) |
role, factor | Billing tier and price factor |
manage | Whether the account has manager permissions (can manage sub-accounts) |
owner | Whether the account is a tenant owner |
plan_follows_parent | Whether the plan and prices follow the parent account |
suspended | Whether the account is suspended for insufficient balance |
user_api_balance | Minimum balance required for manager permissions |
user_min_balance | Suspension threshold (calls are paused below this balance) |
support_qr_url | Support QR code URL (may be omitted) |
Account info
curl "$XSI_BASE_URL/dashboard/info" -H "Authorization: Bearer $XSI_API_KEY"object is user_info. Main fields:
| Field | Description |
|---|---|
id, name, alias, email, billing_email, dna | Account identifiers |
level, tier, role, factor | Routing group, tier, billing tier and price factor |
balance | Available balance |
credit_used | Cumulative credit used |
credit_balance | Array of credit grants, each {amount, balance, reference, granted_at, expires_at}; every grant has its own expiry |
daily_limit, hard_limit, soft_limit | Daily limit, monthly limit (requests are rejected once exceeded) and monthly reference value (takes no part in admission) |
rpm, rph, rpd, tpm, tph, tpd | Account-level request and token rate limits; 999999999999999999 means unlimited |
user_limit, user_n | Maximum and current number of sub-accounts |
requests | Cumulative request count |
resources | Resource (path) allowlist; empty means unrestricted |
allow_ips, allow_models, allow_levels | IP, model and Level allowlists (omitted when empty) |
model_limits | Model-level limits {model: {rpm, rph, rpd, tpm, tph, tpd}} |
model_mapper, level_mapper | Account-level mappings (including the runtime resolution cache) |
create_at | Creation time (the field name is spelled this way) |
Live usage
curl "$XSI_BASE_URL/dashboard/live" -H "Authorization: Bearer $XSI_API_KEY"In addition to all /dashboard/info fields (object is user_live), it adds daily_usage and monthly_usage. Fields in these two objects are PascalCase:
| Field | Description |
|---|---|
Requests | Request count |
Prompt, Completion, Reasoning | Input, output and reasoning tokens |
CreditUsed | Credit used (CNY) |
Find, PageN, QueryN | File search count, page count, and search/tool call count |
ImageN, ImageCost, SizeHigh, SizeMedium, SizeLow | Image count, cost and size-tier distribution |
CachedDetails, PromptDetails, CompletionDetails | Cache and modality details |
ModelUsage | Objects with the same structure, broken down by model name |
Suitable for dashboard polling; use /dashboard/bill for historical trends.
Billing history
GET /dashboard/bill # Today
GET /dashboard/bill?date=2026-11-18 # A specific day
GET /dashboard/bill?start=2026-11-01&end=2026-11-18 # A range (inclusive)
GET /dashboard/bill?days=7 # Today and the previous 7 days, 8 calendar days in total| Parameter | Aliases | Description |
|---|---|---|
date | d | A single day; highest precedence |
start | s, start_date | Start date |
end | e, end_date | End date; defaults to today |
days | β | Number of days to look back |
- An invalid date format returns
400 Invalid date format. Please use YYYY-MM-DD format. - Queries spanning more than 30 days are charged one
XAPI_FEE; ranges longer than 3 years are truncated to start 3 years ago and charged 5 additional times.
Response structure
/dashboard/bill and /x-bill share the following structure (object is bill_info):
| Field | Description |
|---|---|
daily_costs[] | Ascending by date: timestamp, date, line_items[] ({name, cost, usage}, broken down by model), that day's total_*, usage_analysis, token_summary |
usage_summary | Totals per model over the whole range; values are {model_stats, usage_analysis, token_summary} |
total_requests, total_credit_used | Total requests and cost |
total_prompt, total_completion, total_reasoning | Token totals |
total_find, total_page_n, total_query_n | Totals for file searches, pages, and search and tool calls |
total_image_n, total_size_high, total_size_medium, total_size_low | Image totals |
total_cached_details, total_prompt_details, total_completion_details | Detail totals (may be omitted) |
token_summary | input_total, input_uncached, cache_read, cache_write, cache_related, output_total, reasoning_output, processed_total |
{
"object": "bill_info",
"daily_costs": [
{
"timestamp": 1763395200,
"date": "2026-11-18",
"total_requests": 24,
"total_prompt": 18200,
"total_completion": 3600,
"total_credit_used": 1.42,
"line_items": [{"name": "gpt-6.2-sol", "cost": 1.42, "usage": {}}]
}
],
"usage_summary": {"gpt-6.2-sol": {}},
"total_requests": 24,
"total_prompt": 18200,
"total_completion": 3600,
"total_reasoning": 0,
"total_credit_used": 1.42,
"token_summary": {"input_total": 18200, "cache_read": 6400, "output_total": 3600, "processed_total": 21800}
}Management call fees appear in the bill under the model name XAPI.
Descendant usage
GET /x-bill?start=2026-11-01&end=2026-11-18
GET /x-bill?user=42&days=30Aggregates all descendants below the current account, excluding the current account itself. Requires manager permissions; this endpoint itself is not charged a management call fee.
| Parameter | Description |
|---|---|
date/d, start/s/start_date, end/e/end_date, days | Same as /dashboard/bill |
user/u | Filters descendants: numeric ID, account name, email (contains @), DNA prefix (starts with .), or L<n>/G<n>/R<n>/T<n>/F<x> (by Level, Gear, Role, Tier, Factor). Returns 404 User not found if the target is not a descendant or nothing matches |
Ranges longer than 3 years are truncated to 36 months; if there are more than 8192 descendants, only the first 8192 are counted.
On top of the shared structure, /x-bill adds usage_users, which includes only accounts with requests in the range, sorted by cost from highest to lowest:
| Field | Description |
|---|---|
id, name, alias, email | Account identifiers |
top_cost_model, top_request_model | Model with the highest cost and model with the most requests |
total_*, token_summary | Totals for this account |
usage_analysis.request_percentage, usage_analysis.cost_percentage | Share of requests and cost across all descendants (two decimal places) |
Activity log
GET /dashboard/logs?page=1&size=24Requires manager permissions.
| Parameter | Description |
|---|---|
page | Page number, starting at 1 |
size | Items per page, 1β100, default 24 |
The response is {logs, total, page, size, has_more}. Each log entry contains id, timestamp, pid, parent_name, action, user_id, user_name, details, ip and user_agent.
action values: add_user, update_user, delete_user, get_users, add_key, update_key, delete_key, sleep_key, wake_key, create_news, rotate_self, auto_config. The 10 most recent log entries are kept per account; sensitive actions such as account deletion are retained separately.
Notifications
curl "$XSI_BASE_URL/dashboard/news" -H "Authorization: Bearer $XSI_API_KEY"{"sys_news": [], "user_news": [], "dna_news": []}| Field | Source |
|---|---|
sys_news | System announcements published by root |
user_news | Personal notifications sent to the current account; cleared after being read once |
dna_news | Notifications sent to the current account's group (accounts with exactly the same DNA, i.e. direct sub-accounts of the same parent) |
Each notification is {title, content, created_at, expires_at, created_by}; expired notifications are not returned. To publish notifications, see Account Management API.
Choosing an endpoint
- Current balance and live totals for the current day and month:
/dashboard/live - The current account for a given day or range, or broken down by model:
/dashboard/bill - Overall consumption and rankings across all descendants:
/x-bill