Query agent usage in organization
Sums what an organization's or a project's agents used over a range of days in UTC, grouped as asked. Private agents count too.
GET
Sums what an organization's or a project's agents used over a range of days in UTC, grouped as asked. Private agents count too.
bearerheader
AuthorizationBearer <token>An access token, or an API key.
organization*stringThe organization's ID.
Match
^org_[0-7][0-9a-hjkmnp-tv-z]{25}$startDate?stringThe first day to sum, in UTC, such as 2026-01-31. Defaults to the first of the current month.
Format
dateendDate?stringThe last day to sum, in UTC. Defaults to today. At most 400 days after startDate.
Format
dategroupBy?array<>What to group the sums by: DATE, the day in UTC; PROJECT; PRINCIPAL, whom the agents worked for, who last wrote to each; AGENT. None sums them all into one row.
OK
application/json- response
rows*array<>A row for each group, ordered by the dimensions grouped by.
curl -X GET 'https://api.kosem.ai/v1/organizations/string/agent-usage'Example Response
{
"rows": [
{
"agent": "string",
"agents": 0,
"date": "2019-08-24",
"principal": "string",
"project": "string",
"webSearches": 0
}
]
}