Google API Keys Weren't Secrets. But then Gemini Changed the Rules.

Simon Willison Blog
Generative AI

Google API Keys Weren't Secrets. But then Gemini Changed the Rules. Yikes! It turns out Gemini and Google Maps (and other services) share the same API keys. but Google Maps API keys are designed to be public, since they are embedded directly in web pages. Gemini API keys can be used to access private files and make billable API requests, so they absolutely should not be shared. If you don't understand this it's very easy to accidentally enable Gemini billing on a previously public API key that exists in the wild already.