Usage & spend
What your keys and account spent: per request, per day, bucketed and across apps.
8 operations. Errors link to their row on the overview.
Get usage over a windowlink to Get usage over a window
GET /v1/usage
With a caller key (or key=<id> from a session): that key’s burn over window, OpenRouter generation shape. From a session without key: paid-versus-list spend over period.
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
windowstring optionalKey usage window; default day. One of
day,week,month.keystring optionalKey id to read (sessions only; a caller key reads itself).
periodstring optionalAccount spend period (session without
key); default week. One ofweek,month,all.
Response 200
The key aggregate, or the account period projection.
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 |
curl
curl -sS -X GET "https://superbot.gg/v1/usage" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/usage`, {
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",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The key aggregate, or the account period projection.
"string"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"
}List usage per requestlink to List usage per request
GET /v1/usage/requests
One generation per request, newest first.
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
keystring optionalKey id to read (sessions only).
limitinteger optionalRows to return, 1-100; default 20.
Response 200
The generations.
objectstring requiredOne of
list.dataarray of UsageGeneration required15 fields
request_idstringnative_tokens_promptnumber requirednative_tokens_completionnumber requiredcache_readnumber requiredcache_writenumber requiredtotal_costnumber requiredUSD at vendor list price.
cache_discountnumber requiredis_byokboolean requiredmodelstringkey_labelstringsession_idstringlatency_msnumberttft_msnumberstatusinteger requiredtsstring required
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 |
curl
curl -sS -X GET "https://superbot.gg/v1/usage/requests" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/usage/requests`, {
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/requests",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The generations.
{
"object": "list",
"data": [
{
"request_id": "your-request-id",
"native_tokens_prompt": 0,
"native_tokens_completion": 0,
"cache_read": 0,
"cache_write": 0,
"total_cost": 0,
"cache_discount": 0,
"is_byok": true,
"model": "your-model",
"key_label": "your-key-label",
"session_id": "your-session-id",
"latency_ms": 0,
"ttft_ms": 0,
"status": 0,
"ts": "your-ts"
}
]
}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"
}Get usage per UTC daylink to Get usage per UTC day
GET /v1/usage/daily
The account’s usage per UTC day across every key, with totals. A person key (one minted for a person) reads its own person’s usage here, never the account’s.
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
fromstring (date) optionalYYYY-MM-DD; default 30 days before
to.tostring (date) optionalYYYY-MM-DD; default today (UTC).
Response 200
One row per day.
fromstring requiredtostring requireddaysarray of UsageDay required9 fields
daystring requiredtokensnumber requiredtokens_innumber requiredtokens_outnumber requiredcache_readnumber requiredcache_writenumber requiredturnsinteger requiredcost_usdnumber requiredcharged_usdnumber required
totalsobject required6 fields
tokensnumber requiredtokens_innumber requiredtokens_outnumber requiredturnsinteger requiredcost_usdnumber requiredcharged_usdnumber required
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 |
curl
curl -sS -X GET "https://superbot.gg/v1/usage/daily" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/usage/daily`, {
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/daily",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 One row per day.
{
"from": "your-from",
"to": "your-to",
"days": [
{
"day": "2026-09-18",
"tokens": 0,
"tokens_in": 0,
"tokens_out": 0,
"cache_read": 0,
"cache_write": 0,
"turns": 0,
"cost_usd": 0,
"charged_usd": 0
}
],
"totals": {
"tokens": 0,
"tokens_in": 0,
"tokens_out": 0,
"turns": 0,
"cost_usd": 0,
"charged_usd": 0
}
}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"
}Get usage bucketed and groupedlink to Get usage bucketed and grouped
GET /v1/usage/breakdown
Usage bucketed by hour or day, grouped by key, lane, role, session or model, narrowed by any filter. A person key reads its own person’s usage here, never the account’s.
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
fromstring (date) optionalYYYY-MM-DD; default 30 days before
to.tostring (date) optionalYYYY-MM-DD; default today (UTC).
tzstring optionalIANA zone the days and buckets are read in; default UTC.
bucketstring optionalBucket width; default day. One of
day,hour.groupstring optionalSplit dimension; default none. One of
none,key,lane,role,session,model.keystring optionalOnly rows from this key id.
lanestring optionalOnly rows on this lane.
rolestring optionalOnly rows with this agent role.
sessionstring optionalOnly rows in this session.
Response 200
Buckets, groups and totals.
fromstring requiredtostring requiredtzstring requiredbucketstring requiredOne of
day,hour.groupstring requiredtotalsUsageMetrics required8 fields
requestsinteger requiredtokens_innumber requiredtokens_outnumber requiredcache_readnumber requiredcache_writenumber requiredtokensnumber requiredBilled credits.
usdnumber requiredlist_usdnumber required
groupsarray of UsageMetrics & object required10 fields
requestsinteger requiredtokens_innumber requiredtokens_outnumber requiredcache_readnumber requiredcache_writenumber requiredtokensnumber requiredBilled credits.
usdnumber requiredlist_usdnumber requiredidstring requiredlabelstring required
bucketsarray of UsageMetrics & object required11 fields
requestsinteger requiredtokens_innumber requiredtokens_outnumber requiredcache_readnumber requiredcache_writenumber requiredtokensnumber requiredBilled credits.
usdnumber requiredlist_usdnumber requiredkeystring requiredstartstring requiredbyobject required
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 |
curl
curl -sS -X GET "https://superbot.gg/v1/usage/breakdown" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/usage/breakdown`, {
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/breakdown",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 Buckets, groups and totals.
{
"from": "your-from",
"to": "your-to",
"tz": "your-tz",
"bucket": "day",
"group": "your-group",
"totals": {
"requests": 0,
"tokens_in": 0,
"tokens_out": 0,
"cache_read": 0,
"cache_write": 0,
"tokens": 0,
"usd": 0,
"list_usd": 0
},
"groups": [
{
"requests": 0,
"tokens_in": 0,
"tokens_out": 0,
"cache_read": 0,
"cache_write": 0,
"tokens": 0,
"usd": 0,
"list_usd": 0,
"id": "your-id",
"label": "your-label"
}
],
"buckets": [
{
"requests": 0,
"tokens_in": 0,
"tokens_out": 0,
"cache_read": 0,
"cache_write": 0,
"tokens": 0,
"usd": 0,
"list_usd": 0,
"key": "your-key",
"start": "your-start",
"by": {}
}
]
}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"
}Export usage rowslink to Export usage rows
GET /v1/usage/export
The usage rows as a CSV (default), JSON or newline-delimited JSON attachment.
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
fromstring (date) optionalYYYY-MM-DD; default 30 days before
to.tostring (date) optionalYYYY-MM-DD; default today (UTC).
formatstring optionalAttachment format; default csv. One of
csv,json,ndjson.tzstring optionalIANA zone the days and buckets are read in; default UTC.
keystring optionalOnly rows from this key id.
lanestring optionalOnly rows on this lane.
rolestring optionalOnly rows with this agent role.
sessionstring optionalOnly rows in this session.
Response 200
The rows, as an attachment.
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 |
curl
curl -sS -X GET "https://superbot.gg/v1/usage/export" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/usage/export`, {
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/export",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The rows, as an attachment.
[
{}
]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"
}Get the credit balancelink to Get the credit balance
GET /v1/credits
The credit balance, the period meter and the plan.
A caller key holding billing:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Response 200
The balance.
creditsobject requiredThe pot view: beta, plan and permanent credits with a total.
balance_creditsnumber requiredbalance_tokensnumber requiredtotal_usage_tokensnumber requiredperiod_usage_tokensnumber requiredcapacity_tokensnumber requiredkeys_countinteger requiredpaid_usd_weeknumber requiredlist_usd_weeknumber requiredsaved_usd_weeknumber requiredplanstring requiredrenews_atstring
Errors
| Status | Code | What to change |
|---|---|---|
| 401 | unauthorized | Send a live caller key or session as |
| 403 | insufficient_scope | The key lacks the scope in |
curl
curl -sS -X GET "https://superbot.gg/v1/credits" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/credits`, {
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/credits",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The balance.
{
"credits": {},
"balance_credits": 0,
"balance_tokens": 0,
"total_usage_tokens": 0,
"period_usage_tokens": 0,
"capacity_tokens": 0,
"keys_count": 0,
"paid_usd_week": 0,
"list_usd_week": 0,
"saved_usd_week": 0,
"plan": "your-plan",
"renews_at": "your-renews-at"
}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"
}Get AI spend across appslink to Get AI spend across apps
GET /v1/spend
AI spend across every app on the account over a window, by provider and day.
A caller key holding usage:read (Authorization: Bearer sbc_… or x-api-key: sbc_…), or a signed-in session.
Query parameters
rangestring optionalWindow; default 30d. One of
30d,90d,month,custom.fromstring (date) optionalYYYY-MM-DD, with range=custom.
tostring (date) optionalYYYY-MM-DD, with range=custom.
Response 200
The spend report.
fromstring requiredtostring requiredcurrencystring requiredOne of
USD.total_usdnumber requiredtied_usdnumber requiredestimated_usdnumber requiredunpriced_modelsarray of string requiredprovidersarray of object required13 fields
providerstring requiredlabelstring requiredtotal_usdnumber requiredusage_usdnumber requiredpurchase_usdnumber requiredmeasured_usdnumber requiredestimated_usdnumber requiredplan_usdnumber requiredresidual_usdnumber | null requiredstatusstring requiredOne of
caught_up,residual,estimate_only.servicesarray of object required2 fields
servicestring requiredtotal_usdnumber required
unpriced_usagearray of object required7 fields
servicestring requiredskustring requiredquantitynumber requiredunitstring requiredOne of
tokens,requests,acu,seat-month.period_startstring requiredperiod_endstring requiredfresh_atstring required
sourcesarray of object required3 fields
sourcestring requiredfresh_atstring | null requiredstatusstring requiredOne of
ok,stale,missing.
seriesarray of object required2 fields
daystring requiredprovidersobject required
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 |
curl
curl -sS -X GET "https://superbot.gg/v1/spend" \
-H "Authorization: Bearer $SUPERBOT_API_KEY"JavaScript
const res = await fetch(`https://superbot.gg/v1/spend`, {
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/spend",
headers={
"Authorization": f"Bearer {os.environ['SUPERBOT_API_KEY']}",
},
)
print(res.status_code, res.json())200 The spend report.
{
"from": "your-from",
"to": "your-to",
"currency": "USD",
"total_usd": 0,
"tied_usd": 0,
"estimated_usd": 0,
"unpriced_models": [
"your-unpriced-models"
],
"providers": [
{
"provider": "your-provider",
"label": "your-label",
"total_usd": 0,
"usage_usd": 0,
"purchase_usd": 0,
"measured_usd": 0,
"estimated_usd": 0,
"plan_usd": 0,
"residual_usd": 0,
"status": "caught_up",
"services": [
{}
],
"unpriced_usage": [
{}
],
"sources": [
{}
]
}
],
"series": [
{
"day": "your-day",
"providers": {}
}
]
}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"
}Get a usage reportlink to Get a usage report
GET /v1/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.
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.