AI billing
What an account’s AI work may cost: the balance it is spent from and the limits it is spent against. Runs on a key of the account’s own are neither charged nor limited.
Get AI billing
The account's AI balance, what it has spent today and this month, and the limits on that spending. Runs on the platform's key are paid from the balance and checked against the limits before they start; runs on the account's own provider key are not.
path Parameters
account_idId of the parent account.
Headers
If-None-MatchA matching etag answers 304 with no body (§16).
Get AI billing › 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.
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).
balanceThe AI balance as Money: what runs on the platform's key (MANAGED) are paid from. It is the balance after the latest row of ai_transactions, and it can be negative when runs started together spent past it.
currency_codeThe currency the balance, the limits and every charge are kept in (ISO 4217).
monthly_limitThe most the account may spend on the platform's key in a calendar month (UTC), as Money. A run that could take the month past it is refused before it starts. Leave it unset for no limit.
daily_limitThe most the account may spend on the platform's key in a calendar day (UTC), as Money. A run that could take the day past it is refused before it starts.
max_concurrent_executionsThe most runs the account may have queued or running at once, on any connection — a turn the AI assistant is answering counts as one. A run or a turn started past it is refused with CONCURRENCY_LIMIT_REACHED.
platform_monthly_limitThe platform's monthly ceiling for this account, as Money. It applies over monthly_limit: the lower of the two is the one in force.
platform_daily_limitThe platform's daily ceiling for this account, as Money, in force over daily_limit.
platform_max_concurrent_executionsThe platform's ceiling on runs queued or running at once for this account, in force over max_concurrent_executions.
spend_todayWhat runs on the platform's key were charged today (UTC), as Money — the figure daily_limit is measured against.
spend_mtdWhat runs on the platform's key were charged this calendar month so far (UTC), as Money — the figure monthly_limit is measured against.
Update AI billing
Sets the account's own limits on spending from the AI balance: monthly_limit and daily_limit as Money, and max_concurrent_executions. Clear a limit by naming it in update_mask with a null value. The balance cannot be changed here, and neither can the platform's ceilings shown beside the limits — the lower of each pair is the one in force.
path Parameters
account_idId of the parent account.
query Parameters
update_maskComma-separated field paths to merge. A field named here and sent as null is cleared; without the mask a null is dropped (§7, §11).
Headers
If-MatchThe etag the client last read. A mismatch is ABORTED (409) with the current resource in the error details (§14).
Update AI billing › Request Body
monthly_limitThe most the account may spend on the platform's key in a calendar month (UTC), as Money. A run that could take the month past it is refused before it starts. Leave it unset for no limit.
daily_limitThe most the account may spend on the platform's key in a calendar day (UTC), as Money. A run that could take the day past it is refused before it starts.
max_concurrent_executionsThe most runs the account may have queued or running at once, on any connection — a turn the AI assistant is answering counts as one. A run or a turn started past it is refused with CONCURRENCY_LIMIT_REACHED.
Update AI billing › Responses
The updated 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.
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).
balanceThe AI balance as Money: what runs on the platform's key (MANAGED) are paid from. It is the balance after the latest row of ai_transactions, and it can be negative when runs started together spent past it.
currency_codeThe currency the balance, the limits and every charge are kept in (ISO 4217).
monthly_limitThe most the account may spend on the platform's key in a calendar month (UTC), as Money. A run that could take the month past it is refused before it starts. Leave it unset for no limit.
daily_limitThe most the account may spend on the platform's key in a calendar day (UTC), as Money. A run that could take the day past it is refused before it starts.
max_concurrent_executionsThe most runs the account may have queued or running at once, on any connection — a turn the AI assistant is answering counts as one. A run or a turn started past it is refused with CONCURRENCY_LIMIT_REACHED.
platform_monthly_limitThe platform's monthly ceiling for this account, as Money. It applies over monthly_limit: the lower of the two is the one in force.
platform_daily_limitThe platform's daily ceiling for this account, as Money, in force over daily_limit.
platform_max_concurrent_executionsThe platform's ceiling on runs queued or running at once for this account, in force over max_concurrent_executions.
spend_todayWhat runs on the platform's key were charged today (UTC), as Money — the figure daily_limit is measured against.
spend_mtdWhat runs on the platform's key were charged this calendar month so far (UTC), as Money — the figure monthly_limit is measured against.