Stolen Gemini API Key Turned $180 Bill to $82000 in Two Days


A small three-person dev team says attackers stole its Google API key and ran up $82,314.44 in usage charges in 48 hours, turning a normal $180 monthly bill into an existential cost spike. The developer shared the incident publicly after seeing most of the spend tied to Gemini 3 Pro Image and Gemini 3 Pro Text usage during February 11–12.

This type of blow-up can happen fast because API keys can act as a direct billable credential for Gemini usage, and attackers automate high-volume calls the moment they find a usable key. A separate security report from Truffle Security also shows how widely exposed Google API keys already exist on the public internet, which increases the chance of abuse when projects enable Gemini.

What happened in this case

The developer says they revoked the key, rotated credentials, and tightened IAM, but the bill had already landed. They also say Google support pointed to the shared responsibility model and left them responsible for the charges. Journalists at The Register and TechSpot independently reported the same core claim, including the dollar amount and the 48-hour window.

This incident lines up with a broader pattern: bot-driven credential abuse that targets cloud and AI services because billing scales with usage and abuse scripts run 24/7. It also highlights a recurring problem in cloud cost control. Budget alerts warn you, but they do not automatically stop spending unless you build an automated response.

Why a leaked key can become a huge Gemini bill

Two factors drive the risk.

First, Google Cloud API keys can start as “project identifiers” used for services like Maps or other client-side integrations, and developers historically treated many of those keys as low sensitivity. Truffle Security says Gemini changed that reality because the same keys may now authenticate to Gemini endpoints after enabling the Gemini API in a project.

Second, Google’s own documentation shows that rate limits and quotas exist, but they often apply at the project level, not the API key level. If you rely on one key in multiple places, a single compromise can burn through quotas and money quickly before anyone notices.

What the attackers likely did

Most public write-ups describe a familiar playbook.

Attackers obtain a working key from source code, logs, a client app, a misconfigured repo, a compromised endpoint, or a scraped website. They then send automated requests to high-cost endpoints, often using multiple workers and steady throughput. That behavior matches how the dev team described the spike and how researchers describe modern API key abuse.

Incident snapshot

DetailWhat was reported
Reported charges$82,314.44
Reported time window48 hours (Feb 11–12)
Normal spend~$180 per month
Main services abusedGemini 3 Pro Image, Gemini 3 Pro Text
Response taken by teamDeleted key, rotated credentials, tightened IAM
Current dispute statusDeveloper says support did not waive charges

A practical Google Cloud checklist that prevents “bill shock”

You can reduce the chance of catastrophic spend with four controls. None of them rely on perfect secrecy.

1) Restrict API keys to only what they must call

Google recommends adding both application restrictions and API restrictions to keys. API restrictions let you limit which APIs a key can call, so a Maps key cannot suddenly call Gemini endpoints.

2) Cap usage with quotas where possible

Google documents ways to cap API usage by limiting requests per day or per minute, depending on the API. For Gemini specifically, Google notes that rate limits vary by model and apply per project.

3) Add budget alerts, then automate a kill switch

Google explicitly warns that budget alerts do not cap usage or charges. Google also provides official guidance for automatically disabling billing based on budget notifications, which can stop further spend by turning off billing for the project.

4) Avoid long-lived keys in production

Google’s Vertex AI Gemini guidance recommends API keys for testing and recommends stronger production authentication patterns. That guidance helps reduce reliance on long-lived keys that leak easily.

Control table

Security controlGoogle Cloud featureWhat to set
Key scopingAPI key restrictionsRestrict key to only required APIs, block Gemini on legacy keys
App scopingApplication restrictionsRestrict by IP, HTTP referrer, Android package, or iOS bundle where applicable
Quota capsAPI and service quotasSet request caps aligned to real usage, especially for image models
Billing guardrailBudgets + notificationsSet alerts and trigger automated billing disable when threshold hits

If this happens to you, do these steps in order

  • Revoke the key immediately and rotate anything that key could reach.
  • Check for other keys in the same project that defaulted to unrestricted use.
  • Pull usage logs and export evidence while you still have access.
  • Open a billing support case and include a timeline, IPs, user agents, and the exact services billed.
  • Follow Google’s billing issue resolution guidance and keep the case active while you provide evidence.

Google does not promise a waiver in its documentation. Still, strong evidence improves your odds of a favorable adjustment, especially when you show that the activity did not match your service behavior.

FAQ

What is the main lesson from the $82,000 Gemini bill story?

API keys can turn into high-value credentials for Gemini usage, and abuse can explode costs in hours.

Does a budget alert stop charges automatically?

No. Google warns that budget alerts do not cap usage or charges, so you need automation if you want a hard stop.

Can I restrict an API key so it cannot call Gemini?

Yes. Google documents API restrictions that limit which APIs a key can call, and Google recommends applying restrictions to all keys.

Do Gemini rate limits protect me if my key leaks?

They help, but limits apply per project and vary by model. You still need key restrictions, quotas, and billing automation for real protection.

Where do I start if I want an automatic billing kill switch?

Google provides an official guide to disable billing using budget notifications. It shuts down services in the project when triggered, so test it carefully.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages