Endpoint#
Endpoint
GET https://xpluse.plus/v1/user/balanceReturns the balance status for the account that owns the current API Key, including available balance, total top-ups, and total spend. The same endpoint is also exposed through Anthropic and Gemini entry points with the same response structure:
Endpoint
GET https://xpluse.plus/v1/user/balance
GET https://api.xpluse.plus/anthropic/user/balance
GET https://api.xpluse.plus/gemini/user/balanceWorks with any valid DataMind AI Key and is compatible with third-party tools such as cc-switch.
Authentication#
Header
Authorization: Bearer sk-xxxUse a user-level API Key created in the console. Do not use Internal/Gateway keys.
Request example#
cURL
curl https://xpluse.plus/v1/user/balance \
-H "Authorization: Bearer $DATAMIND_API_KEY" Python
import os
import requests
resp = requests.get(
"https://xpluse.plus/v1/user/balance",
headers={"Authorization": f"Bearer {os.environ['DATAMIND_API_KEY']}"},
)
data = resp.json()
print(f"Available balance: ${data['balance']:.4f} {data['currency']}")TypeScript
const resp = await fetch('https://xpluse.plus/v1/user/balance', {
headers: { Authorization: `Bearer ${process.env.DATAMIND_API_KEY}` },
})
const data = await resp.json()
console.log(`Available balance: $${data.balance.toFixed(4)} ${data.currency}`)ResponseFormat#
JSON
{
"is_active": true,
"balance": 42.1357,
"total": 100.0000,
"used": 57.8643,
"currency": "USD"
}| Field | Type | Description |
|---|---|---|
is_active | boolean | Whether the account is active; authentication success returns true, failure returns false |
balance | number | Current available balance, equal to total - used |
total | number | Total credited amount: top-ups + bonuses + gift cards |
used | number | Total spend across all calls |
currency | string | Currency unit, fixed as "USD" |
Error response#
JSON
{ "error": "unauthenticated", "is_active": false }| Status code | error value | Description |
|---|---|---|
401 | unauthenticated | API Key is invalid, disabled, or expired |
500 | internal error | Internal service error; retry later |
Last updated on April 28, 2026