Endpoint#

Endpoint
GET https://xpluse.plus/v1/user/balance

Returns 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/balance

Works with any valid DataMind AI Key and is compatible with third-party tools such as cc-switch.

Authentication#

Header
Authorization: Bearer sk-xxx

Use 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"
}
FieldTypeDescription
is_activebooleanWhether the account is active; authentication success returns true, failure returns false
balancenumberCurrent available balance, equal to total - used
totalnumberTotal credited amount: top-ups + bonuses + gift cards
usednumberTotal spend across all calls
currencystringCurrency unit, fixed as "USD"

Error response#

JSON
{ "error": "unauthenticated", "is_active": false }
Status codeerror valueDescription
401unauthenticatedAPI Key is invalid, disabled, or expired
500internal errorInternal service error; retry later

Last updated on April 28, 2026