Google Cloud cost tracking: Firebase, Gemini, Vertex AI
See what each Google Cloud project and service costs per day, including Firebase, the Gemini API and Vertex AI, next to your hosting and AI bills.
What Burnstack tracks
- Net daily cost in USD per project and service (cost minus credits such as the free tier and committed use discounts), from the Cloud Billing Standard usage cost export to BigQuery (Google docs)
- Everything billed to the billing account: Compute Engine, Cloud Run, Firebase products, the Gemini API, Vertex AI and the rest
- Tax and adjustments too; charges without a project sit on the billing account
Alerts
- Vendor spend spike: a day above 2.5× Google Cloud's 14-day median
The key you'll need
Two things in one field: the export table's full name on the first line (project.dataset.gcp_billing_export_v1_…), then the contents of a service account's JSON key. The service account needs only BigQuery Data Viewer on the export dataset and BigQuery Job User on its project, to read that table and run queries (Google docs). First turn on the Standard usage cost export under Billing → Billing export (Google docs). The key help in Burnstack walks through it step by step; allow about 15 minutes.
Burnstack checks the key with Google Cloud, shows the account it belongs to when Google Cloud lets the key see it, and stores it in your computer's keychain (macOS Keychain or Windows Credential Manager). It only reads billing and usage.
Connect it: Google Cloud
Need
- Key: Billing export table and service account JSON key
- Plan: A USD Cloud Billing account; you need Billing Account Administrator or Costs Manager to turn on the export.
- Permissions: BigQuery Data Viewer (on the export dataset) BigQuery Job User (on the project)
Turn on the Standard usage cost export to BigQuery under Billing → Billing export (costs appear from then on, plus the previous month for US/EU datasets). Create a service account with BigQuery Data Viewer on the export dataset and BigQuery Job User on its project, then create a JSON key for it. Paste the export table (project.dataset.gcp_billing_export_v1_…) on the first line and the JSON key file below it. Organizations that block key creation (iam.disableServiceAccountKeyCreation) can't connect this way. USD billing accounts only. Each sync runs one or two small BigQuery queries, normally within BigQuery's free tier. Covers Firebase, Gemini API and Vertex AI.
Steps
Open Google Cloud's key page ↗
- In Billing → Billing export, enable Standard usage cost to a BigQuery dataset (US or EU).
- Create a service account named burnstack, with no project-wide roles.
- Grant it BigQuery Data Viewer on the export dataset and BigQuery Job User on the project.
- Keys → Add key → Create new key → JSON; the file downloads once.
- Paste the export table on the first line and the JSON file's contents below it, then delete the file.
Paste it
In Burnstack: Connectors → Google Cloud → Add key → paste → Validate & save. The key goes straight into your computer's keychain.
If it fails
- invalid_grant: Invalid JWT Signature.
- The key was deleted or disabled, or isn't this service account's. Create a new JSON key.
- Access Denied: … User does not have bigquery.jobs.create permission
- Grant BigQuery Job User on the export table's project.
- Not found: Table
- Check the table name (project.dataset.gcp_billing_export_v1_…); a new export can take a few hours to create it.
- BigQuery API has not been used in project … or it is disabled
- Enable the BigQuery API in the export table's project.
- Key creation is disabled (iam.disableServiceAccountKeyCreation) not yet verified
- Your organization blocks service account keys (the default since May 2024). An org policy administrator can exempt the billing project.
Let your AI do the clicking
Paste this into an AI assistant that can use your browser, such as Claude in Chrome. It opens Google Cloud's key page and sets only the permissions above, then stops before the final button that creates the key.
Open https://console.cloud.google.com/billing/export in my browser. Check that 'Standard usage cost' is enabled on the BigQuery export tab; if it isn't, stop and ask me which project and dataset to use, and don't enable anything I haven't confirmed. Then in that project open IAM & Admin → Service accounts → Create service account, name it 'burnstack', and grant it no project roles. Grant it 'BigQuery Data Viewer' on the export dataset only (BigQuery → the dataset → Share → Manage permissions → Add principal) and 'BigQuery Job User' on the project (IAM & Admin → IAM → Grant access). Then open the service account's Keys tab, choose Add key → Create new key and select JSON. Tell me the export table's full name; it isn't secret. Google Cloud has no expiry setting for this key file, so skip that. Stop before clicking 'Create' (the final button that creates the key file) and tell me it's ready. I'll click it, copy the key file and paste it into Burnstack myself. Don't copy, read or paste the key file, and don't grant broader access or change any other setting. If Google Cloud asks me to sign in or confirm with 2FA, wait for me.
The key never passes through the AI: you click that last button yourself, copy the key and paste it into Burnstack.
What you'll see
- Billed: Billed cost, as Google Cloud charges it.
- History: From when the export was turned on (plus the previous month for US/EU datasets).
- Delay: Hours; Google gives no delivery or latency guarantees.
Good to know
- History starts when you turn the export on. A US or EU multi-region dataset also gets the previous month back-filled, which can take up to five days; a single-region dataset starts on the day you enable it (Google docs). The first data takes a few hours to appear.
- Each sync runs two small BigQuery queries that read only the days they need and are capped at 100 GiB billed, so they fit in BigQuery's free tier of 1 TB of queries a month per project (Google docs), unless that project already uses it up.
- Days are UTC. Google counts billing days in Pacific time (its own example queries use
US/Pacific, Google docs), so totals near the start and end of a month can differ slightly from Google's invoice. - Billing accounts in US dollars only, and one billing account per key.
- Organizations that block service account keys need an exception for the billing project. Google enforces that block by default for organizations created on or after May 3, 2024 (Google docs).
- No breakdown by SKU, region or label. Google Workspace, Google Play and Google Ads aren't in Cloud Billing; Google Workspace invoices can be imported.
One bill, not a dashboard per vendor
Burnstack puts Google Cloud next to the rest of your spend and lets you group it by product with applications. Other integrations: Vercel, Neon, Supabase, OpenAI, Anthropic, GitHub, OpenRouter, DigitalOcean, Twilio, Stripe fees, Cloudflare, Netlify, AWS, Datadog, Sentry, Cursor, PlanetScale, Azure, MongoDB Atlas, Railway, Render, Heroku, Akamai (Linode), Vultr, Fastly, Runpod, xAI, Together AI, fal.ai, Runway, Upstash.
Google Cloud questions
Why does Google Cloud need a BigQuery export?
Will the BigQuery queries cost me anything?
Does it include Firebase and the Gemini API?
Start watching back.
Five minutes to connect your first vendor. Free for Mac, forever, and every byte stays yours.