Tenant usage
Usage records
Per-call records, cursor-paginated; limit clamps to [1, 200]. Keep paging with next_cursor until items comes back empty. The response is wrapped in a {code, data, message} envelope; the fields below live under data.
GET
/v1/usage/recordsKey request parameters
| Parameter | Type | Description |
|---|---|---|
cursor | string | Opaque cursor from previous response |
limit | integer | Defaults to 50. |
Key response parameters
| Parameter | Type | Description |
|---|---|---|
items | Record[] | Per-call rows |
items[].id | uuid | Request ID |
items[].requested_model | string | The model sent in the request |
items[].public_model_id | uuid | Resolved model UUID, if any |
items[].status | enum | succeeded | failed | canceled | timeout |
items[].stream | boolean | Whether the request was streamed |
items[].started_at | datetime | ISO 8601 UTC |
items[].completed_at | datetime | Completion time, ISO 8601 UTC; omitted if not finished |
items[].total_tokens | integer | Total tokens |
items[].tenant_charge | decimal string | Charge for this call |
items[].currency | string | ISO 4217 |
next_cursor | string | Pass back as cursor; omitted when there is no next page |
has_more | boolean | Whether another page may exist |
Integration examples
Replace the API key and model ID in these examples with your values.
cURL
curl "https://hashbidx.ai/v1/usage/records?limit=20" \
-H "Authorization: Bearer <YOUR_API_KEY>"Python
import httpx
resp = httpx.get(
"https://hashbidx.ai/v1/usage/records",
params={"limit": 20},
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)
resp.raise_for_status()
print(resp.json())Node.js
const resp = await fetch("https://hashbidx.ai/v1/usage/records?limit=20", {
headers: { Authorization: "Bearer <YOUR_API_KEY>" },
});
console.log(await resp.json());Go
req, _ := http.NewRequest("GET",
"https://hashbidx.ai/v1/usage/records?limit=20", 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/records")
.query(&[("limit","20")])
.bearer_auth("<YOUR_API_KEY>")
.send().await?;If the response includes X-Request-Id, include it when troubleshooting an issue.