Summarize usage
Totals usage between `start` and `end` (default: this calendar month so far), grouped by any of `product`, `unit`, `key`, `project` and `day`. Nodes report usage within seconds; the last minute may still change.
GET
/v1/usage
Totals usage between `start` and `end` (default: this calendar month so far), grouped by any of `product`,
`unit`, `key`, `project` and `day`. Nodes report usage within seconds; the last minute may still change.
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Query Parameters
start
string (date-time)
optional
query
end
string (date-time)
optional
query
group_by
string
optional
query
Comma-separated dimensions.
Example:
"product,unit,day"project_id
string
optional
query
Only this project.
Responses
200
The usage summary.
application/jsonobject
string
REQUIRED
Enum:
usage_summarystart
string (date-time)
REQUIRED
end
string (date-time)
REQUIRED
group_by
string[]
REQUIRED
Array of:
string
rows
object[]
REQUIRED
Array of:
product
string
REQUIRED
unit
string
REQUIRED
qty
number
REQUIRED
key_id
string
project_id
string
day
string (date)
400
The request failed validation (`invalid_request`, `invalid_url`).
401
Missing, malformed, expired or revoked credentials (`unauthorized`).
403
Authenticated but not allowed (`forbidden`, `egress_denied`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta-api.b3os.org/v1/usage' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/usage', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/usage', headers=headers)print(response.json())
200
Response
{ "object": "usage_summary", "start": "2026-10-01T00:00:00.000Z", "end": "2026-10-25T22:00:00.000Z", "group_by": [ "product", "unit" ], "rows": [ { "product": "vision", "unit": "vision.page", "qty": 18204 }, { "product": "sandboxes", "unit": "sandboxes.vcpu_ms", "qty": 9120330 }, { "product": "infer", "unit": "infer.output_tokens", "qty": 4410920 } ]}
API Playground
Try this endpoint
GET
/v1/usage