Skip to content

How do I set a budget alert for Vertex AI spend?

Who
GCP admin, or a billing admin
Time
2 minutes

Gemini tokens are billed to your project at Google’s list price. A budget alert is the control. It sends email to the billing admins at 50%, 90% and 100% of a monthly amount. It never cuts anything off.

Every setup option creates one when you pass a billing account. The default amount is 50 in the billing account’s currency (EUR or USD for most accounts). For scale: a full day of building in our own testing used $0.59 of tokens.

Terminal window
gcloud billing projects describe <GCP_PROJECT_ID> --format='value(billingAccountName)'

The value looks like billingAccounts/XXXXXX-XXXXXX-XXXXXX; the part after the slash is <BILLING_ACCOUNT_ID>.

Terminal window
gcloud services enable billingbudgets.googleapis.com --project <GCP_PROJECT_ID>
gcloud billing budgets create --billing-account=<BILLING_ACCOUNT_ID> \
--display-name=applane-vertex-<GCP_PROJECT_ID> \
--budget-amount=50 \
--filter-projects=projects/<GCP_PROJECT_ID> \
--threshold-rule=percent=0.5 --threshold-rule=percent=0.9 --threshold-rule=percent=1.0

Creating a budget needs roles/billing.costsManager on the billing account, which project owners do not always have. If the command is refused, ask a billing admin to run it or to create the budget in the console under Billing > Budgets & alerts.

Leave out --budget-account (script) or billing_account_id (Terraform, Infrastructure Manager) if finance manages budgets elsewhere. Everything else works the same.

Terminal window
gcloud billing budgets list --billing-account=<BILLING_ACCOUNT_ID>
gcloud billing budgets delete <BUDGET_ID> --billing-account=<BILLING_ACCOUNT_ID>

For AI agents: llms.txt, llms-full.txt, or any page with a .md suffix.