curl --silent --show-error --fail-with-body --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 --silent --show-error --fail-with-body --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
}
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.
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 |
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/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 September 21, 2026