Skip to content
AISpendbook

AI providers · Read with a key

Google Gemini and Vertex AI

Billed Gemini API and Vertex AI cost by day, project and SKU from your Cloud Billing export in BigQuery, in USD with credits kept separate. Models and token types come from SKU names. Provisioned Throughput purchases are kept with their term. Optional: daily Vertex AI token counts from Cloud Monitoring (beta), and GKE / Compute Engine GPU cost for the infrastructure report.

How data moves
AI Spendbook reads it on a schedule with a key, token or read-only role you give it.
Credential
Service account
What it covers
billed cost, provider-reported usage, infrastructure cost
Money
The vendor's billed amount
Runs
each scheduler run (daily on the hosted deployment)
Freshness
As fresh as the Cloud Billing export in BigQuery, which Google loads with a delay; the trailing 5 days are re-read.
History on first sync
Up to 365 days
Not included
customer, feature, end user, api key
Status
Built from the vendor's public documentation and tested with recorded responses. Not yet run against a live account.

Set it up

  1. In Cloud Billing, open Billing export and enable the standard usage cost export to BigQuery. Note the project and dataset. The table appears within a few hours.
  2. Create a service account, for example spendbook-billing-reader, in the project that will run the queries.
  3. Grant it roles/bigquery.jobUser on that project and roles/bigquery.dataViewer on the export dataset. Add roles/monitoring.viewer only if you turn on token metrics.
  4. Create a JSON key for the service account and paste the whole file here. We store it encrypted and show only the service account email.
  5. Enter the query project, the dataset and the table name (gcp_billing_export_v1_ plus the billing account ID with underscores).
  6. Validate. We check access with a free dry run before the first sync.

What it needs

A service account with roles/bigquery.jobUser on the query project and roles/bigquery.dataViewer on the billing export dataset (or table). For the optional token metrics, roles/monitoring.viewer on each monitored project. Access is read-only (OAuth scopes bigquery.readonly and monitoring.read).

Every connector, by family

Start with your own numbers.

Every plan is free during launch. No credit card.