News for hackers. Stuff that matters.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by Maxious on Thursday April 16, 2026 @09:16AM (#47792528)
> The Gemini API supports monthly spend caps at both the billing account tier and project levels. These controls are designed to protect your account from unexpected overages, and the ecosystem to ensure service availability

https://ai.google.dev/gemini-api/docs/billing#project-spend-...

Re:€54k spike in 13h from unrestricted Firebase browser key ... by rtkwe on Thursday April 16, 2026 @09:19AM (#47792557)
The problem is it's specific to that API and defaults to uncapped so people who aren't using it and haven't heard about the issues with the Firebase API keys probably won't have set them.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by isoldex on Thursday April 16, 2026 @09:56AM (#47793027)
Spend caps exist for Gemini (Maxious linked them) - they just default to OFF. For an API that can bill four figures per hour, opt-in safety by default isn't a UX choice, it's a billing strategy
Re:€54k spike in 13h from unrestricted Firebase browser key ... by zozbot234 on Thursday April 16, 2026 @09:23AM (#47792615)
Except that Google's own statements are extremely clear that "leaked" (i.e. public) API keys should not be able to access the Gemini API in the first place: "We have identified a vulnerability where some API keys may have been publicly exposed. To protect your data and prevent unauthorized access, we have proactively blocked these known leaked keys from accessing the Gemini API. ... We are defaulting to blocking API keys that are leaked and used with the Gemini API, helping prevent abuse of cost and your application data." https://ai.google.dev/gemini-api/docs/troubleshooting#google...

For extra clarity on the exact so-called "vulnerability" that Google identified, see: https://news.ycombinator.com/item?id=47156925 This describes the very issue where some API keys were public by design (used for client-side web access), so the term "leaked" should be read in that unusually broad sense. Firebase keys are obviously covered, since they're also public by design.

(As for "Firebase AI Logic", it is explicitly very different: it's supposed to be implemented via a proxy service so the Gemini API key is never seen by the client: https://firebase.google.com/docs/ai-logic Clearly, just casually "enabling" something - which is what OP says they did! - should never result in abuse of cost on the scale OP describes.)

Re:€54k spike in 13h from unrestricted Firebase browser key ... by sillysaurusx on Thursday April 16, 2026 @09:26AM (#47792653)
There are other vectors, e.g. a compromised GCP key leading to $13k in Gemini charges (posted 3 days ago) https://www.reddit.com/r/googlecloud/comments/1sjzat3/api_ke...
Re:€54k spike in 13h from unrestricted Firebase browser key ... by whywhywhywhy on Thursday April 16, 2026 @09:44AM (#47792848)
Why is the default uncapped then other than the hopes of billing people who screw up or get exploited.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by logankilpatrick on Thursday April 16, 2026 @09:58AM (#47793070)
We have a bunch of different protections in place, every account has a billing account cap by default (see: https://ai.google.dev/gemini-api/docs/billing#tier-spend-cap...), in the addition to the ability to set more granular developer spend caps.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by drfloyd51 on Thursday April 16, 2026 @09:51AM (#47792949)
See also: Why is the default cap so low? I lost €78bojillion because my API stopped working.
Re:€54k spike in 13h from unrestricted Firebase browser key ... by Barbing on Thursday April 16, 2026 @10:33AM (#47793568)
Demand on-call phone numbers, autodial the entire company when it looks like they’re about to lose their first bojillion.

No, you don't really have to give Google a bunch of phone numbers. The input box will also accept entry of the following text:

“I'm a big stupid idiot, and when my API stops working, which it will, it will be all my fault and not Google's.”

Re:€54k spike in 13h from unrestricted Firebase browser key ... by jamespo on Thursday April 16, 2026 @10:00AM (#47793098)
Monitoring could pick this up in minutes rather than how long this took to discover
Re:€54k spike in 13h from unrestricted Firebase browser key ... by drfloyd51 on Friday April 17, 2026 @02:15PM (#47808890)
Monitoring could have detected overspend as well.

My point is either choice, caps or no caps, has its cons.