Tenant usage
Usage summary
Usage and charges bucketed by hour or day; without start, the window reaches back 30 days from end, which defaults to today (UTC). The response is wrapped in a {code, data, message} envelope; the fields below live under data.
GET
/v1/usage/summaryKey request parameters
| Parameter | Type | Description |
|---|---|---|
bucket | string | day | hour. Defaults to day. |
start | date | Inclusive start, YYYY-MM-DD; defaults to 30 days before end |
end | date | Inclusive end, YYYY-MM-DD; defaults to today (UTC) |
model_id | uuid | Optional model UUID filter |
Key response parameters
| Parameter | Type | Description |
|---|---|---|
bucket | string | day or hour |
start | date | Effective start date |
end | date | Effective end date |
buckets | Bucket[] | Per-window stats |
buckets[].window_start | datetime | ISO 8601 UTC |
buckets[].model_id | uuid | Present when filtering by model |
buckets[].request_count | integer | Number of requests in this window |
buckets[].total_tokens | integer | Total tokens |
buckets[].tenant_charge | decimal string | Total charge in this window |
buckets[].currency | string | ISO 4217 |
Integration examples
Replace the API key and model ID in these examples with your values.
cURL
curl "https://hashbidx.ai/v1/usage/summary?bucket=day&start=2026-09-01&end=2026-09-22" \
-H "Authorization: Bearer <YOUR_API_KEY>"Python
import httpx
resp = httpx.get(
"https://hashbidx.ai/v1/usage/summary",
params={"bucket": "day", "start": "2026-09-01", "end": "2026-09-22"},
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)
resp.raise_for_status()
print(resp.json())Node.js
const params = new URLSearchParams({
bucket: "day",
start: "2026-09-01",
end: "2026-09-22",
});
const resp = await fetch(`https://hashbidx.ai/v1/usage/summary?${params}`, {
headers: { Authorization: "Bearer <YOUR_API_KEY>" },
});
console.log(await resp.json());Go
req, _ := http.NewRequest("GET",
"https://hashbidx.ai/v1/usage/summary?bucket=day&start=2026-09-01&end=2026-09-22", 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/usage/summary")
.query(&[("bucket","day"),("start","2026-09-01"),("end","2026-09-22")])
.bearer_auth("<YOUR_API_KEY>")
.send().await?;If the response includes X-Request-Id, include it when troubleshooting an issue.