AI transactions
The immutable ledger of every charge to an account’s AI balance and every change the platform made to it. A correction is a row of its own.
List AI transactions
The account's AI ledger: every charge for a call to a model on the platform's key — an attempt of a run, or a call the AI assistant made — and every change the platform made to the balance, newest first. Rows are never edited or deleted — a correction is a row of its own.
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: create_time, execution_id, pricing_id, source_id, source_module, type, usage_record_id. A field outside the list is INVALID_ARGUMENT.
List AI transactions › Responses
One page of ai_transactions.
This page of ai_transactions, 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 transaction
The account's AI ledger: every charge for a call to a model on the platform's key — an attempt of a run, or a call the AI assistant made — and every change the platform made to the balance, newest first. Rows are never edited or deleted — a correction is a row of its own.
path Parameters
account_idId of the parent account.
ai_transaction_idId of the parent ai_transaction.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get AI transaction › 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).
typeCHARGE for a call to a model on the platform's key; TOP_UP, REFUND, ADJUSTMENT or BONUS for a change made by the platform.
amountThe row's amount as Money, signed: negative for a charge, positive for money put in.
balance_afterThe balance right after this row, as Money, so a statement reads without adding up the rows before it.
execution_idThe ai_executions entry a CHARGE of a run is for. Absent on a charge of an interactive call and on every other type.
source_moduleThe part of MooverApp that called the model — assistant for the AI assistant. On a charge 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 a CHARGE is for, from 1 — a turn of the assistant may call the model several times, and each call is charged once. Absent on a charge of a run.
usage_record_idThe ai_usage_records entry — the call and its token counts — a CHARGE was priced from.
pricing_idThe price row a CHARGE was priced at. Price rows never change, so a later price change does not restate it.
descriptionWhat the row is for, in words: the run and attempt or the call of a charge, or the reason given for a change.