curl --silent --show-error --fail-with-body --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 --silent --show-error --fail-with-body --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
}
]
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
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 |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --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 September 21, 2026