curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-tool' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"tool_name": "string",
"calls": 1,
"total_duration_ms": 8,
"avg_duration_ms": 7.5,
"error_calls": 1
}
],
"total_calls": 1
}
Get Usage By Tool V1
Tool-level work breakdown across the tenant’s jobs. Joins ToolExecution → Job to scope by tenant…
GET
/
api
/
v1
/
usage
/
by-tool
curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-tool' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"tool_name": "string",
"calls": 1,
"total_duration_ms": 8,
"avg_duration_ms": 7.5,
"error_calls": 1
}
],
"total_calls": 1
}
Tool-level work breakdown across the tenant’s jobs.
Joins ToolExecution → Job to scope by tenant; aggregates call count,
total + average duration, and a heuristic error count per tool name.
Useful for spotting whether a slow rollout is ‘computer is slow’ vs.
‘we issue 10x as many bash calls as we used to.‘
Response
UsageByToolResponse
UsageByToolRow[]
required
Sorted by total_duration_ms descending — heaviest tool first.
Show UsageByToolRow
Show UsageByToolRow
string
required
Tool identifier (bash, computer, browser, …).
integer
required
Total invocations across all jobs.
integer
required
Sum of duration_ms across calls.
number
required
Mean duration per call.
integer
required
Count of calls whose tool_output starts with an ‘error’ marker — best-effort heuristic, not a strict success/fail classification.
integer
required
Status codes
| Code | Meaning |
|---|---|
200 | Successful Response |
curl --request GET \
--url 'https://api.computer.stateset.app/api/v1/usage/by-tool' \
--header "X-API-Key: $STATESET_COMPUTER_USE_API_KEY"
{
"rows": [
{
"tool_name": "string",
"calls": 1,
"total_duration_ms": 8,
"avg_duration_ms": 7.5,
"error_calls": 1
}
],
"total_calls": 1
}
Last modified on August 31, 2026