← All horror stories

Bill horror story

€54,000 in 13 hours: a Firebase browser key used for Gemini

October 21, 2026 · 3 min read

After enabling Firebase AI Logic, automated traffic used the project's unrestricted browser key. The €80 budget alert fired hours late.

Retold from Google AI Developers Forum, by zanbezi, April 15, 2026. Summary in our own words; every figure is the source's.

What happened

Shortly after turning on Firebase AI Logic in an existing project, the poster saw automated Gemini traffic coming through the browser API key Firebase had created for the project. The key had no API restrictions. In the poster's words: "The traffic was not correlated with our actual users and appeared to be automated."

About €28,000 had built up before they could react, and the total passed €54,000 in around 13 hours. They had an €80 budget alert and a cost anomaly alert; both fired hours late. The thread reached the front page of Hacker News.

How it ended

Google Cloud support called it valid usage and denied a billing adjustment. A Google employee replied in the thread about new safeguards (spend caps and plans to disable unrestricted keys) and asked the poster to get in touch. The thread doesn't show a final resolution.

What would have stopped it

  • Restricting the Firebase key. Limiting the browser key to the APIs the app uses, or protecting AI Logic with App Check, closes the door this traffic came through.
  • Not relying on the budget alert. An €80 alert that fires hours late is a notification after the fact (why alerts lag).
  • Acting on usage within minutes. AI Logic token usage reaches Cloud Monitoring in minutes. A spike rule on it, with a Soft Kill that turns AI features off or a Hard Kill as a last resort, would have stopped the spend in the first hour.
FireWand logo

Managing a Firebase Data Connect database?

FireWand lets you browse, filter and edit your tables with a real SQL console, free for your first project.

Try FireWand →