3 ms·
> 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 unexp
by Maxious 6mo ago
> 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-caps https://ai.google.dev/gemini-api/docs/billing#project-spend-...
- rtkwe 6mo agoThe 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.
- zozbot234 6mo agoExcept 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#googles_security_measures_for_leaked_keys 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 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 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.)
- sillysaurusx 6mo agoThere 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_key_compromised_13428_fraudulent_charges/ https://www.reddit.com/r/googlecloud/comments/1sjzat3/api_ke...
- isoldex 6mo agoSpend 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
- whywhywhywhy 6mo agoWhy is the default uncapped then other than the hopes of billing people who screw up or get exploited.
- drfloyd51 6mo agoSee also: Why is the default cap so low? I lost €78bojillion because my API stopped working.
- jamespo 6mo agoMonitoring could pick this up in minutes rather than how long this took to discover
- drfloyd51 6mo agoMonitoring could have detected overspend as well. My point is either choice, caps or no caps, has its cons.
- Barbing 6mo agoDemand 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.”
- logankilpatrick 6mo agoWe 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-caps https://ai.google.dev/gemini-api/docs/billing#tier-spend-cap...), in the addition to the ability to set more granular developer spend caps.