curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/trend' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"period": "string",
"start_date": "2026-08-31T14:22:05Z",
"end_date": "2026-08-31T14:22:05Z",
"buckets": [
{
"date": "2026-08-31T14:22:05Z",
"jobs": 1,
"tokens": 1,
"cost_usd": 1.5
}
]
}
Get Usage Trend V1
Daily cost / token / job-count trend. Returns a zero-filled per-day rollup so dashboards can render a sparkline without client-side gap-filling…
GET
/
api
/
v1
/
usage
/
trend
curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/trend' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"period": "string",
"start_date": "2026-08-31T14:22:05Z",
"end_date": "2026-08-31T14:22:05Z",
"buckets": [
{
"date": "2026-08-31T14:22:05Z",
"jobs": 1,
"tokens": 1,
"cost_usd": 1.5
}
]
}
Daily cost / token / job-count trend.
Returns a zero-filled per-day rollup so dashboards can render a
sparkline without client-side gap-filling. Always uses UTC calendar
days; same-day usage records are aggregated regardless of when in
the day they landed.
Query parameters
string
Window length. One of 7d / 30d / 90d.
Response
UsageTrendResponse
string
required
The window queried (‘7d’, ‘30d’, ‘90d’).
string
required
string
required
UsageTrendBucket[]
required
Day-by-day rollup, oldest first, with zero-filled rows for dates that had no activity. Length always equals the period in days.
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
422 | Validation Error |
curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/trend' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"period": "string",
"start_date": "2026-08-31T14:22:05Z",
"end_date": "2026-08-31T14:22:05Z",
"buckets": [
{
"date": "2026-08-31T14:22:05Z",
"jobs": 1,
"tokens": 1,
"cost_usd": 1.5
}
]
}
Last modified on August 31, 2026