Skip to content

Usage

4 calls. Every request needs the Authorization header: see the overview.

GET /usage/breakdown

Totals grouped by one dimension.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Query parameters

NameTypeRequiredDescription
groupBystringRequired: the dimension to group by: namespace, type, definition, version, agent, provider, model, engine, credentialKind, tier, outcome, startedBy, trigger or root.
sortstringThe measure to order rows by, descending: any metric a series takes (default tokens).
limitintegerHow many rows: 1 to 500 (clamped), default 50. The rest are summed into other.
fromstringThe start of the range: ISO 8601 with an offset, rounded down to the hour (UTC). Default: to minus 7 days.
tostringThe end of the range: ISO 8601 with an offset, rounded up to the hour (UTC). Default: the start of the next hour.
namespacestring[]Namespace names, matched as GET /processes matches them. The name a deleted or renamed namespace had also matches.
typestring[]Kinds of run: Interaction, App, Capsule or CodePipeline (case-insensitive).
definitionIdstring[]Ids of the definitions (interactions, apps, capsules, code pipelines) whose runs to include.
versionstring[]Definition versions, as {definitionId}:{version}.
agentstring[]Agent names: the interaction or code pipeline agents whose turns or steps used the tokens.
providerstring[]The AI providers that served interaction turns, such as Anthropic.
modelstring[]Model names.
enginestring[]Code pipeline engines, as CodeEngineType names.
credentialKindstring[]Whose provider key served the tokens: Own (the tenant’s or the run’s own key), Platform (Maitento’s) or Unknown (none was recorded).
tierstring[]Pricing tiers, for models whose price depends on how many tokens a request uses.
outcomestring[]How the runs ended: InProgress, Finished, Error or Killed.
startedBystring[]What started the runs: User, Automation or Parent.
triggerIdstring[]Ids of the users or automations that started the runs.
rootDefinitionIdstring[]Definition ids of the runs at the top of the tree: everything an app (or any top-level run) caused, the runs it started included.

Response: UsageBreakdown (200)

curl -X GET "https://api.maitento.com/usage/breakdown" \
-H "Authorization: $MAITENTO_AUTH"
GET /usage/runs

Individual runs with their usage (truncated says more matched than were returned).

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Query parameters

NameTypeRequiredDescription
fromstringThe start of the range: ISO 8601 with an offset, rounded down to the hour (UTC). Default: to minus 7 days.
tostringThe end of the range: ISO 8601 with an offset, rounded up to the hour (UTC). Default: the start of the next hour.
namespacestring[]Namespace names, matched as GET /processes matches them. The name a deleted or renamed namespace had also matches.
typestring[]Kinds of run: Interaction, App, Capsule or CodePipeline (case-insensitive).
definitionIdstring[]Ids of the definitions (interactions, apps, capsules, code pipelines) whose runs to include.
versionstring[]Definition versions, as {definitionId}:{version}.
agentstring[]Agent names: the interaction or code pipeline agents whose turns or steps used the tokens.
providerstring[]The AI providers that served interaction turns, such as Anthropic.
modelstring[]Model names.
enginestring[]Code pipeline engines, as CodeEngineType names.
credentialKindstring[]Whose provider key served the tokens: Own (the tenant’s or the run’s own key), Platform (Maitento’s) or Unknown (none was recorded).
tierstring[]Pricing tiers, for models whose price depends on how many tokens a request uses.
outcomestring[]How the runs ended: InProgress, Finished, Error or Killed.
startedBystring[]What started the runs: User, Automation or Parent.
triggerIdstring[]Ids of the users or automations that started the runs.
rootDefinitionIdstring[]Definition ids of the runs at the top of the tree: everything an app (or any top-level run) caused, the runs it started included.
sortstringWhat to order runs by, descending: tokens (default), runtime, execution or date.
limitintegerHow many runs: 1 to 200 (clamped), default 50.

Response: UsageRunPage (200)

curl -X GET "https://api.maitento.com/usage/runs" \
-H "Authorization: $MAITENTO_AUTH"
GET /usage/series

A time series of one metric, bucketed and optionally grouped.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Query parameters

NameTypeRequiredDescription
fromstringThe start of the range: ISO 8601 with an offset, rounded down to the hour (UTC). Default: to minus 7 days.
tostringThe end of the range: ISO 8601 with an offset, rounded up to the hour (UTC). Default: the start of the next hour.
namespacestring[]Namespace names, matched as GET /processes matches them. The name a deleted or renamed namespace had also matches.
typestring[]Kinds of run: Interaction, App, Capsule or CodePipeline (case-insensitive).
definitionIdstring[]Ids of the definitions (interactions, apps, capsules, code pipelines) whose runs to include.
versionstring[]Definition versions, as {definitionId}:{version}.
agentstring[]Agent names: the interaction or code pipeline agents whose turns or steps used the tokens.
providerstring[]The AI providers that served interaction turns, such as Anthropic.
modelstring[]Model names.
enginestring[]Code pipeline engines, as CodeEngineType names.
credentialKindstring[]Whose provider key served the tokens: Own (the tenant’s or the run’s own key), Platform (Maitento’s) or Unknown (none was recorded).
tierstring[]Pricing tiers, for models whose price depends on how many tokens a request uses.
outcomestring[]How the runs ended: InProgress, Finished, Error or Killed.
startedBystring[]What started the runs: User, Automation or Parent.
triggerIdstring[]Ids of the users or automations that started the runs.
rootDefinitionIdstring[]Definition ids of the runs at the top of the tree: everything an app (or any top-level run) caused, the runs it started included.
metricstringThe measure: tokens (default), input, output, cacheRead, cacheWrite, reasoning, runtime, execution, runs, steps, stepRuntime, toolCalls, webSearches, webPages, webDownloads, imageDescriptions, webCredits or webBytes.
bucketstringThe bucket size: hour, day or week. Omitted: chosen from the range’s length.
groupBystringA dimension to split the series by (any groupBy a breakdown takes), or tokenType with metric=tokens. Omitted: one total series.
topintegerHow many of the largest groups get a series of their own: 1 to 10 (clamped), default 5. The rest form one “other” series.

Response: UsageSeries (200)

curl -X GET "https://api.maitento.com/usage/series" \
-H "Authorization: $MAITENTO_AUTH"
GET /usage/summary

Totals for the window.

Who can call it: Admins and members, with an API key or a portal session. Try it in the API playground.

Query parameters

NameTypeRequiredDescription
fromstringThe start of the range: ISO 8601 with an offset, rounded down to the hour (UTC). Default: to minus 7 days.
tostringThe end of the range: ISO 8601 with an offset, rounded up to the hour (UTC). Default: the start of the next hour.
namespacestring[]Namespace names, matched as GET /processes matches them. The name a deleted or renamed namespace had also matches.
typestring[]Kinds of run: Interaction, App, Capsule or CodePipeline (case-insensitive).
definitionIdstring[]Ids of the definitions (interactions, apps, capsules, code pipelines) whose runs to include.
versionstring[]Definition versions, as {definitionId}:{version}.
agentstring[]Agent names: the interaction or code pipeline agents whose turns or steps used the tokens.
providerstring[]The AI providers that served interaction turns, such as Anthropic.
modelstring[]Model names.
enginestring[]Code pipeline engines, as CodeEngineType names.
credentialKindstring[]Whose provider key served the tokens: Own (the tenant’s or the run’s own key), Platform (Maitento’s) or Unknown (none was recorded).
tierstring[]Pricing tiers, for models whose price depends on how many tokens a request uses.
outcomestring[]How the runs ended: InProgress, Finished, Error or Killed.
startedBystring[]What started the runs: User, Automation or Parent.
triggerIdstring[]Ids of the users or automations that started the runs.
rootDefinitionIdstring[]Definition ids of the runs at the top of the tree: everything an app (or any top-level run) caused, the runs it started included.

Response: UsageSummary (200)

curl -X GET "https://api.maitento.com/usage/summary" \
-H "Authorization: $MAITENTO_AUTH"