Wallet and usage
Read your prepaid balance and ledger, and your monthly usage, from the API or the Console.
Your developer wallet is a prepaid USD balance. A request reserves its worst-case cost while it runs (held_usd), then settles at the exact cost; if it fails before an answer, the reservation is released and nothing is charged.
curl "https://api.tessen.ai/v1/wallet/balance?scope=developer" \ -H "Authorization: Bearer $TESSEN_API_KEY" curl "https://api.tessen.ai/v1/wallet/ledger?scope=developer&limit=5" \ -H "Authorization: Bearer $TESSEN_API_KEY"import osimport requests headers = {"Authorization": f"Bearer {os.environ['TESSEN_API_KEY']}"} balance = requests.get("https://api.tessen.ai/v1/wallet/balance", params={"scope": "developer"}, headers=headers, timeout=30)balance.raise_for_status()print("available USD:", balance.json()["available_usd"]) ledger = requests.get("https://api.tessen.ai/v1/wallet/ledger", params={"scope": "developer", "limit": 5}, headers=headers, timeout=30)ledger.raise_for_status()for entry in ledger.json()["entries"]: print(entry["created_at"], entry["source"], entry["amount_usd"], entry["balance_after_usd"])const headers = { Authorization: `Bearer ${process.env.TESSEN_API_KEY}` }; const balance = await fetch("https://api.tessen.ai/v1/wallet/balance?scope=developer", { headers });if (!balance.ok) throw new Error(`HTTP ${balance.status}`);console.log("available USD:", (await balance.json()).available_usd); const ledger = await fetch("https://api.tessen.ai/v1/wallet/ledger?scope=developer&limit=5", { headers });if (!ledger.ok) throw new Error(`HTTP ${ledger.status}`);for (const entry of (await ledger.json()).entries) { console.log(entry.created_at, entry.source, entry.amount_usd, entry.balance_after_usd);}GET /v1/wallet/balance?scope=developer
balance_usdnumberTotal balance.
held_usdnumberReserved for requests in flight.
available_usdnumberbalance_usd minus held_usd: what a new request can spend.
low_balance, emptybooleanConvenience flags.
updated_atstringTime of the last change.
GET /v1/wallet/ledger?scope=developer&limit=N
entries[].amount_usdnumberNegative for a charge, positive for a credit.
entries[].balance_after_usdnumberThe balance after this entry.
entries[].sourcestringusage_debit (a request's charge), adjustment (a credit applied by Tessen, such as a pilot testing credit), topup, refund, reversal or plan_grant.
entries[].reasonstringFor a charge, the family and endpoint, such as zero_payg_settlement:family:z1:…. For a credit, its label.
entries[].created_at, idstringTime and identifier.
Usage
GET /v1/economy/usage returns monthly request and token totals. It is not a statement of what you were charged: for that, read the ledger.
In the Console
Wallet & Billing shows the balance, held credit, recent activity and the transaction list; Usage & Costs shows the monthly totals. Both are at https://console.tessen.ai.
Adding funds is not open yet. A credit that Tessen applies to a pilot account appears as an adjustment row labelled "Pilot testing credit".