Skip to content
dimmiDocs

AI agent

Get AI agent usage

GET/api/v1/ai/usage

Authorization

Authorizationstringrequired

An API token, sent as Bearer <token>.

Needs the ai:read ability

Query parameters

periodstring

The month as YYYY-MM, such as 2026-11. Leave out for the current month.

Response 200

OK
dataobjectrequired
Show child attributes
answered_countintegerrequired

Runs this month that ended with an answer.

Format: int64

by_modelobject[] | nullrequired

The month's call count for each model. Empty when there were no calls.

Show child attributes
callsintegerrequired

How many calls were made to this model in the month.

Format: int64

modelstringrequired

Id of the model.

by_outcomeobject[] | nullrequired

How many of the month's runs ended each way. Empty when there were no runs.

Show child attributes
outcomestringrequired

How the runs ended, such as answered, unknown, handoff, silent or skipped.

runs_countintegerrequired

How many of the month's runs ended this way.

Format: int64

cached_input_tokensintegerrequired

How many of the month's input tokens were read from the provider's cache.

Format: int64

capped_atstring | nullrequired

When the month's spending cap was reached. Null when it has not been.

Format: date-time

dailyobject[] | nullrequired

Runs for each day of the month, days in UTC.

Show child attributes
daystringrequired

The day in UTC, as YYYY-MM-DD, such as 2026-11-23.

runs_countintegerrequired

How many times the agent ran that day.

Format: int64

handoff_countintegerrequired

Runs this month that ended with a handoff to the team.

Format: int64

input_tokensintegerrequired

Tokens sent to the models this month.

Format: int64

output_tokensintegerrequired

Tokens the models wrote this month.

Format: int64

period_startstringrequired

First day of the month the numbers cover, as YYYY-MM-DD, such as 2026-11-01.

runs_countintegerrequired

How many times the agent ran this month.

Format: int64

silent_countintegerrequired

Runs this month where the agent chose to say nothing.

Format: int64

unknown_countintegerrequired

Runs this month where the agent did not know the answer.

Format: int64

Response error

Error
codestringrequired

Stable code for programs to tell errors apart, such as validation_failed or internal_error.

errorsobject

Each rejected field mapped to its messages. Only present when the input was invalid.

messagestringrequired

What went wrong, in words safe to show a person.