AI usage records
The usage record of every attempt of an account’s AI runs, in tokens — kept for a key of the account’s own too, where nothing is charged.
List AI usage records
What each call to a model the account made consumed, in tokens — each attempt of an AI run and each call the AI assistant made, on the account's own provider key as much as on the platform's. One entry per call whose token counts the provider reported, newest first.
path Parameters
account_idId of the parent account.
query Parameters
page_sizeRows per page. Over the maximum is clamped, not rejected.
page_tokenOpaque token from a previous next_page_token. A token minted under a different order_by/filter is rejected.
skipRows to skip before the page (AIP-158). skip + page_size is capped at 10000; beyond that is OUT_OF_RANGE.
order_byComma-separated field [asc|desc], at most 3 keys. Default: create_time desc. Sortable: create_time.
filterAIP-160 subset (§8). Filterable: agent_id, connection_mode, create_time, execution_id, model_id, provider, source_id, source_module. A field outside the list is INVALID_ARGUMENT.
List AI usage records › Responses
One page of ai_usage_records.
This page of ai_usage_records, in the requested order.
next_page_tokenOpaque. Absent or empty means this was the last page.
total_sizeRows in the whole filtered collection, not in this page.
Get AI usage record
What each call to a model the account made consumed, in tokens — each attempt of an AI run and each call the AI assistant made, on the account's own provider key as much as on the platform's. One entry per call whose token counts the provider reported, newest first.
path Parameters
account_idId of the parent account.
ai_usage_record_idId of the parent ai_usage_record.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get AI usage record › Responses
The resource.
nameThe resource name (§5) — the identity of this resource, and the path that addresses it: websites/{website}/cms_pages/{cms_page}. It is the handle to store, not a human label.
idThe last segment of name on its own, for a client that needs to build a child URL. Unique inside its parent, never across the platform.
create_timeWhen the resource was created (RFC 3339, UTC).
update_timeWhen the resource last changed (RFC 3339, UTC).
etagVersion of the persisted state. Send it back in If-Match on Update or Delete and the write is rejected with ABORTED if anyone else changed the resource meanwhile (§14).
execution_idThe ai_executions entry the attempt belongs to. Absent on a call the AI assistant made, which is no run.
attemptThe number of the attempt within its run, as in the run's attempts. Absent where execution_id is.
agent_idThe ai_agents entry the run executed. Absent where execution_id is.
source_moduleThe part of MooverApp that called the model — assistant for the AI assistant. On an attempt of a run, the source the run was created with, when it named one.
source_idWhat the call was for, in the words of source_module — for the assistant, the turn.
call_indexWhich call to the model of source_id this is, from 1 — a turn of the assistant may call the model several times. Absent on an attempt of a run.
model_idThe ai_models entry the call ran on.
providerThe AI provider that served the call, by the platform's name for it.
connection_modeWhose key the call used: BYOK (the account's own, billed by the provider) or MANAGED (the platform's, charged to the AI balance).
input_tokensInput tokens the provider counted for the call, cache reads and writes not included.
output_tokensOutput tokens the provider counted for the call.
cache_read_input_tokensInput tokens the provider served from its prompt cache.
cache_creation_input_tokensInput tokens the provider wrote to its prompt cache.
raw_usageThe provider's own usage object for the call, exactly as it arrived, kept beside the four counters above.