Tenant billing
Billing balance
A snapshot of your account balance. The response is wrapped in a {code, data, message} envelope; the fields below live under data.
GET
/v1/billing/balanceKey request parameters
| Parameter | Type | Description |
|---|
Key response parameters
| Parameter | Type | Description |
|---|---|---|
balance.status | enum | fresh | stale (cached) | unavailable (amount fields are null) |
balance.balance | decimal string | null | Account balance |
balance.reserved_amount | decimal string | null | Amount reserved for in-flight requests |
balance.available_amount | decimal string | null | Spendable balance: balance minus reservations |
balance.currency | string | null | ISO 4217 |
balance.as_of | datetime | null | Snapshot time |
Integration examples
Replace the API key and model ID in these examples with your values.
cURL
curl https://hashbidx.ai/v1/billing/balance \
-H "Authorization: Bearer <YOUR_API_KEY>"Python
import httpx
resp = httpx.get(
"https://hashbidx.ai/v1/billing/balance",
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)
resp.raise_for_status()
print(resp.json())Node.js
const resp = await fetch("https://hashbidx.ai/v1/billing/balance", {
headers: { Authorization: "Bearer <YOUR_API_KEY>" },
});
console.log(await resp.json());Go
req, _ := http.NewRequest("GET",
"https://hashbidx.ai/v1/billing/balance", nil)
req.Header.Set("Authorization", "Bearer <YOUR_API_KEY>")
resp, err := http.DefaultClient.Do(req)Rust
let resp = reqwest::Client::new()
.get("https://hashbidx.ai/v1/billing/balance")
.bearer_auth("<YOUR_API_KEY>")
.send().await?;If the response includes X-Request-Id, include it when troubleshooting an issue.