Get a usage report
The account’s usage across every key in hourly or daily UTC buckets, grouped by any mix of key, model, lane, role, session and team, and narrowed by any filter. A person key reads its own person’s usage here, never the account’s.
Part of Usage & spend, 8 operations. The overview covers keys, scopes and errors.
GET /v1/usage/report
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
starting_atstring (date-time) optionalRFC 3339 start, floored to the bucket width. Default: 7 days before
ending_at.ending_atstring (date-time) optionalRFC 3339 end (exclusive), ceiled to the bucket width. Default: the end of the current bucket. At most 92 days after
starting_at.bucket_widthstring optionalBucket width; default 1d. One of
1h,1d.group_bystring | array of string optionalSplit each bucket by these dimensions: api_key_id, model, lane, role, session_id, team_id. Repeat the parameter or pass a comma list.
api_key_idsstring | array of string optionalOnly usage from these caller key ids. Repeat the parameter or pass a comma list.
modelsstring | array of string optionalOnly usage on these model ids. Repeat the parameter or pass a comma list.
lanesstring | array of string optionalOnly usage on these lanes: credits, caller_key, byo. Repeat the parameter or pass a comma list.
rolesstring | array of string optionalOnly usage with these agent roles (chat for a plain turn). Repeat the parameter or pass a comma list.
session_idsstring | array of string optionalOnly usage inside these agent runs. Repeat the parameter or pass a comma list.
team_idsstring | array of string optionalOnly usage from keys scoped to these teams. Repeat the parameter or pass a comma list.
limitinteger optionalBuckets per page. 1h: default 24, max 168. 1d: default 7, max 31.
pagestring optionalThe previous response’s
next_page. Repeat group_by and the filters with it.
Response 200
One page of buckets.
objectstring requiredOne of
list.dataarray of UsageBucket required4 fields
objectstring requiredOne of
bucket.starting_atstring (date-time) requiredending_atstring (date-time) requiredresultsarray of UsageResult required14 fields
requestsinteger requiredtokens_innumber requiredtokens_outnumber requiredcache_readnumber requiredcache_writenumber requiredtokensnumber requiredBilled credits.
usdnumber requiredlist_usdnumber requiredapi_key_idstring | nullmodelstring | nulllanestring | nullrolestring | nullsession_idstring | nullteam_idstring | null
has_moreboolean requirednext_pagestring | null requiredPass as
pagefor the next buckets; null on the last page.
Errors
| Status | Code | What to change |
|---|---|---|
| 400 | invalid_request | A parameter or body field is invalid; |
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
| 503 | The account store is not ready; retry later. |
curl
curl -sS -X GET "https://superbot.gg/v1/usage/report" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/usage/report`, {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SUPERBOT_API_KEY}`,
},
});
console.log(res.status, await res.json());Python
import os
import requests
res = requests.request(
"GET",
"https://superbot.gg/v1/usage/report",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 One page of buckets.
{
"object": "list",
"data": [
{
"object": "bucket",
"starting_at": "2026-09-01T00:00:00Z",
"ending_at": "2026-09-01T00:00:00Z",
"results": [
{}
]
}
],
"has_more": true,
"next_page": "your-next-page"
}400 The request is malformed or a parameter is invalid; `param` names the field.
{
"error": "invalid_request",
"message": "A parameter or body field is invalid; param names it and issues lists every problem.",
"doc_url": "https://superbot.gg/developers#errors-invalid_request",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}401 The bearer is missing, malformed or unknown.
{
"error": "unauthorized",
"message": "Send a live caller key or session as Authorization: Bearer … or x-api-key. No key yet: create one at /account/api, or sign a user in at /auth.md.",
"doc_url": "https://superbot.gg/developers#errors-unauthorized",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}403 The key lacks a scope (insufficient_scope), is revoked, or may not call this route.
{
"error": "insufficient_scope",
"message": "The key lacks the scope in required_scopes; mint a key that holds it.",
"doc_url": "https://superbot.gg/developers#errors-insufficient_scope",
"request_id": "req_5f1c0a9e2b7d4c3a1e0f9b8d"
}503 The account store is not ready; retry later.
(no body)No operation matches this filter.