Google Cloud is advising teams to stop using raw Gemini API keys from Google AI Studio once a prototype gains real users. Google Cloud says each developer often holds several keys, kept in.env files, shell profiles and chat threads, and the app carries another in its config.
Google Cloud describes a bearer token: whoever holds the key can use it. The key does not expire on its own, is not tied to a person, machine or workload, and has no spending limit unless one is added. It also says nobody knows which keys to revoke when someone leaves the company.
Its example is an account that normally spends $180 a month. A key lands in a public repo, a Slack channel or a mobile app bundle, and automated scrapers find it within minutes. Google Cloud says the first billing alert can then arrive with a bill in the tens of thousands, and under the shared responsibility model the customer pays for usage made with valid credentials.
The fix starts with a scanner in a companion repo that finds key-shaped strings and reports the file and line, never the key. Each person then runs one gcloud login command, which stores a short-lived credential on their machine. Google Cloud says that single login works for every model in Model Garden, not only Gemini. Later steps give the app its own service account and move remaining keys into Secret Manager.
Source: Google Cloud announcement.