Skip to content

UsageBreakdownRequest

What to group a usage breakdown by, how to order it, and the usual usage filters.

Kind: an object, used in requests.

FieldTypeRequiredDescription
groupBystring | nullRequired: the dimension to group by: namespace, type, definition, version, agent, provider, model, engine, credentialKind, tier, outcome, startedBy, trigger or root.
sortstring | nullThe measure to order rows by, descending: any metric a series takes (default tokens).
limitinteger | nullHow many rows: 1 to 500 (clamped), default 50. The rest are summed into other.
fromstring | nullThe start of the range: ISO 8601 with an offset, rounded down to the hour (UTC). Default: to minus 7 days.
tostring | nullThe end of the range: ISO 8601 with an offset, rounded up to the hour (UTC). Default: the start of the next hour.
namespacestring[] | nullNamespace names, matched as GET /processes matches them. The name a deleted or renamed namespace had also matches.
typestring[] | nullKinds of run: Interaction, App, Capsule or CodePipeline (case-insensitive).
definitionIdstring[] | nullIds of the definitions (interactions, apps, capsules, code pipelines) whose runs to include.
versionstring[] | nullDefinition versions, as {definitionId}:{version}.
agentstring[] | nullAgent names: the interaction or code pipeline agents whose turns or steps used the tokens.
providerstring[] | nullThe AI providers that served interaction turns, such as Anthropic.
modelstring[] | nullModel names.
enginestring[] | nullCode pipeline engines, as CodeEngineType names.
credentialKindstring[] | nullWhose provider key served the tokens: Own (the tenant’s or the run’s own key), Platform (Maitento’s) or Unknown (none was recorded).
tierstring[] | nullPricing tiers, for models whose price depends on how many tokens a request uses.
outcomestring[] | nullHow the runs ended: InProgress, Finished, Error or Killed.
startedBystring[] | nullWhat started the runs: User, Automation or Parent.
triggerIdstring[] | nullIds of the users or automations that started the runs.
rootDefinitionIdstring[] | nullDefinition ids of the runs at the top of the tree: everything an app (or any top-level run) caused, the runs it started included.
{
"groupBy": "...",
"sort": "...",
"limit": 0,
"from": "...",
"to": "...",
"namespace": [
"..."
],
"type": [
"..."
],
"definitionId": [
"..."
],
"version": [
"..."
],
"agent": [
"..."
],
"provider": [
"..."
],
"model": [
"..."
],
"engine": [
"..."
],
"credentialKind": [
"..."
],
"tier": [
"..."
],
"outcome": [
"..."
],
"startedBy": [
"..."
],
"triggerId": [
"..."
],
"rootDefinitionId": [
"..."
]
}