API Reference
Wallet API
API endpoints for token balance and transaction history.
Get Token Ledger
GET /auth/token-ledgerGet your current token balance and full transaction history.
Response: 200
{
"balance": 5000,
"transactions": [
{
"id": "tx-1",
"user_id": "user-id",
"amount": -500,
"balance_after": 5000,
"entry_type": "subscription",
"description": "Subscribed to 'SEO Content Brief Specialist'",
"created_at": "2026-03-30T10:00:00Z"
},
{
"id": "tx-2",
"user_id": "user-id",
"amount": -15,
"balance_after": 4985,
"entry_type": "query",
"description": "Query to 'SEO Content Brief Specialist'",
"created_at": "2026-03-30T10:05:00Z"
}
]
}Get Current User (includes balance)
GET /auth/meReturns user profile including token balance:
{
"id": "user-id",
"email": "dev@example.com",
"token_balance": 5000,
...
}SDK Equivalent
ledger = await client.wallet.ledger()
print(f"Balance: {ledger.balance}")
for tx in ledger.transactions:
print(f" {tx.entry_type}: {tx.amount:+d} - {tx.description}")