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 pathScopePermissionDescription
GET /dashboard/statusCurrent accountAny accountIdentity, balance and capability flags
GET /dashboard/infoCurrent accountAny accountConfiguration, limits and credit details
GET /dashboard/liveCurrent accountAny accountinfo plus live usage for the current day and month
GET /dashboard/billCurrent accountAny accountBills by date with per-model breakdown
GET /dashboard/logsManagement actions of the current accountManagerActivity log
GET /dashboard/newsCurrent accountAny accountSystem, group and personal notifications
GET /x-billDescendantsManagerAggregated bill and account rankings
  • /dashboard/* shares the model-call endpoint and accepts Authorization, x-api-key or x-goog-api-key; /x-bill accepts only Authorization.
  • 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 return 404. /dashboard/* has no /v1 form.

Account status

curl "$XSI_BASE_URL/dashboard/status" -H "Authorization: Bearer $XSI_API_KEY"
FieldDescription
objectAlways user_status
id, name, alias, email, dnaAccount identifiers and lineage path in the account tree
public_keyPublic identifier (pk-Xvs...), used for referral signups and similar
balanceCurrent available balance (CNY)
role, factorBilling tier and price factor
manageWhether the account has manager permissions (can manage sub-accounts)
ownerWhether the account is a tenant owner
plan_follows_parentWhether the plan and prices follow the parent account
suspendedWhether the account is suspended for insufficient balance
user_api_balanceMinimum balance required for manager permissions
user_min_balanceSuspension threshold (calls are paused below this balance)
support_qr_urlSupport 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:

FieldDescription
id, name, alias, email, billing_email, dnaAccount identifiers
level, tier, role, factorRouting group, tier, billing tier and price factor
balanceAvailable balance
credit_usedCumulative credit used
credit_balanceArray of credit grants, each {amount, balance, reference, granted_at, expires_at}; every grant has its own expiry
daily_limit, hard_limit, soft_limitDaily limit, monthly limit (requests are rejected once exceeded) and monthly reference value (takes no part in admission)
rpm, rph, rpd, tpm, tph, tpdAccount-level request and token rate limits; 999999999999999999 means unlimited
user_limit, user_nMaximum and current number of sub-accounts
requestsCumulative request count
resourcesResource (path) allowlist; empty means unrestricted
allow_ips, allow_models, allow_levelsIP, model and Level allowlists (omitted when empty)
model_limitsModel-level limits {model: {rpm, rph, rpd, tpm, tph, tpd}}
model_mapper, level_mapperAccount-level mappings (including the runtime resolution cache)
create_atCreation 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:

FieldDescription
RequestsRequest count
Prompt, Completion, ReasoningInput, output and reasoning tokens
CreditUsedCredit used (CNY)
Find, PageN, QueryNFile search count, page count, and search/tool call count
ImageN, ImageCost, SizeHigh, SizeMedium, SizeLowImage count, cost and size-tier distribution
CachedDetails, PromptDetails, CompletionDetailsCache and modality details
ModelUsageObjects 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
ParameterAliasesDescription
datedA single day; highest precedence
starts, start_dateStart date
ende, end_dateEnd 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):

FieldDescription
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_summaryTotals per model over the whole range; values are {model_stats, usage_analysis, token_summary}
total_requests, total_credit_usedTotal requests and cost
total_prompt, total_completion, total_reasoningToken totals
total_find, total_page_n, total_query_nTotals for file searches, pages, and search and tool calls
total_image_n, total_size_high, total_size_medium, total_size_lowImage totals
total_cached_details, total_prompt_details, total_completion_detailsDetail totals (may be omitted)
token_summaryinput_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=30

Aggregates all descendants below the current account, excluding the current account itself. Requires manager permissions; this endpoint itself is not charged a management call fee.

ParameterDescription
date/d, start/s/start_date, end/e/end_date, daysSame as /dashboard/bill
user/uFilters 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:

FieldDescription
id, name, alias, emailAccount identifiers
top_cost_model, top_request_modelModel with the highest cost and model with the most requests
total_*, token_summaryTotals for this account
usage_analysis.request_percentage, usage_analysis.cost_percentageShare of requests and cost across all descendants (two decimal places)

Activity log

GET /dashboard/logs?page=1&size=24

Requires manager permissions.

ParameterDescription
pagePage number, starting at 1
sizeItems 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": []}
FieldSource
sys_newsSystem announcements published by root
user_newsPersonal notifications sent to the current account; cleared after being read once
dna_newsNotifications 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