Skip to content

Google Cloud — Gemini API and Vertex AI

Pull your Google AI spend into Flowstate so Gemini and Vertex land on the same ledger as payroll and projects, instead of being reconstructed from Cloud Billing every quarter.

Google bills both products through Cloud Billing, so both read from the same place: your Cloud Billing export in BigQuery. Flowstate ships them as two tiles because they are separate line items on your bill:

TileCovers
Gemini API (AI Studio)Generative Language API spend
Vertex AI (GCP)Vertex AI spend

Connect either or both. The setup below is identical for each — once the export exists, the second tile is a two-minute job.

Turn the export on before you need the history

The billing export is not retroactive, and how much history you get depends on a choice you make once:

  • A US or EU multi-region dataset backfills to the start of the previous month. That fill can take up to five days to land.
  • A single-region dataset backfills nothing at all — you only ever see spend from the moment you switch the export on.

The retroactive fill happens only the first time you enable the export. Moving the dataset, changing project, or re-enabling later gets you nothing. If you take one thing from this page: choose a US or EU multi-region dataset.

What syncs

DataGrain
Invoiced costPer SKU, per day, in the currency your billing account is denominated in

This is your actual bill, not an estimate — so it is the figure Flowstate treats as authoritative and never tops up with price-table guesses. Google's billing export carries no token counts and no per-user dimension, so per-person attribution comes from the Flowstate Agent rather than from Google.

What you'll see in Flowstate

  • Spend reconciliation — Google's billed numbers next to Agent telemetry. See Spend.
  • Per-project attribution — with the Agent, Gemini and Vertex calls are attributed to a person, project and cost centre. See Attribution.
  • Cost trends — daily burn, so a leak surfaces before the invoice does.

Getting started

You need Billing Account Costs Manager (or Billing Account Administrator) on the billing account, and BigQuery User on the project that will hold the dataset.

Flowstate reads your export without a service-account key. You create a Workload Identity Pool that trusts Flowstate's OIDC issuer, scoped to your organisation, and let it impersonate a read-only service account. No credential ever leaves your project — which matters because many organisations disable service-account keys outright.

  1. Turn on the BigQuery billing export at console.cloud.google.com → Billing → Billing export, pointing it at a US or EU multi-region dataset
  2. Create a Workload Identity Pool at IAM → Workload Identity Pools that trusts Flowstate's issuer
  3. Grant the reader service account BigQuery Data Viewer on the export dataset and BigQuery Job User on the project
  4. In Flowstate, open Settings → Integrations and the tile you want. Paste the project number, pool id, provider id, reader service-account email and the fully-qualified export table, then click Verify and connect — Flowstate runs one read-only query to check it works before saving anything

How syncing works

Spend syncs hourly, and the first connect backfills whatever history your export holds.

Because the export is non-retroactive, "how far back can I see?" is answered by when you enabled it, not by anything Flowstate controls. If you enable the export today, connect the tile today too — there is nothing to be gained by waiting, and the backfill window only ever moves forward.

If the pool, the impersonation grant or the table name is wrong, the connection shows Google's real error on its provider page rather than silently reporting no spend.

Flowstate Documentation