Query usage data
Retrieve token consumption, cost attribution, and budget status for your organisation. Supports filtering by time range, team, agent, or API surface.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| from | string | query | No | Start of the date range (ISO 8601). Defaults to the start of the current calendar month. |
| to | string | query | No | End of the date range (ISO 8601). Defaults to now. |
| group_by | string | query | No | Aggregation dimension: org, team, agent, user, or surface. |
| team_id | string | query | No | Filter to a specific team. |
Response
{
"period": {
"from": "2026-03-01T00:00:00Z",
"to": "2026-03-19T12:00:00Z"
},
"total_tokens": 1240000,
"budget": {
"total": 5000000,
"used": 1240000,
"remaining": 3760000
},
"breakdown": [
{
"dimension": "team_id",
"value": "tm_01hxyz",
"label": "Support Team",
"tokens": 840000
}
]
}