curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-template' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"template": "string",
"jobs": 1,
"tokens": 1,
"cost_usd": 1.5
}
],
"total_jobs": 1,
"total_tokens": 1,
"total_cost_usd": 1.5
}
Get Usage By Template V1
Cost / token / job-count rollup grouped by agent_type. Joins UsageRecord against Job to pick up the template name…
GET
/
api
/
v1
/
usage
/
by-template
curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-template' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"template": "string",
"jobs": 1,
"tokens": 1,
"cost_usd": 1.5
}
],
"total_jobs": 1,
"total_tokens": 1,
"total_cost_usd": 1.5
}
Cost / token / job-count rollup grouped by
agent_type.
Joins UsageRecord against Job to pick up the template name. Sorted
by cost descending so the biggest line items surface first.
Response
UsageByTemplateResponse
UsageByTemplateRow[]
required
integer
required
integer
required
number
required
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-template' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"template": "string",
"jobs": 1,
"tokens": 1,
"cost_usd": 1.5
}
],
"total_jobs": 1,
"total_tokens": 1,
"total_cost_usd": 1.5
}
Last modified on August 31, 2026