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 helps the billing team spot unexpected spend. 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). Choose an initial budget for your pilot and adjust it after reviewing actual usage. A budget sends notifications; it is not a spending cap. See Google’s budget guide.

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.