Tools2 min read1 source
Google Cloud urges teams to move off raw Gemini API keys
A Google Cloud guide tells teams moving from prototype to product to swap AI Studio keys for user and app identities, Secret Manager and a spend cap.
At a glance
- Date
- Topic
- Tools
- Reading time
- 2 min
- Sources
- 1
This entry is compiled automatically with AI and is not read by a person before it is published. Its sources are below. If you see an error, write to us.

In a developer guide dated 21 November 2026, Google Cloud argues that Gemini prototypes built on raw API keys from Google AI Studio should drop those keys on the way to production. According to the guide, such a key is a bearer token that anyone holding it can use: it does not expire on its own, is not tied to a person or a machine, and has no spending limit unless you add one.
Google’s example is hypothetical: an account that normally spends $180 a month has a key end up in a public repository or a mobile app bundle, and by the first billing alert the bill has reached tens of thousands of dollars. Google notes that under the shared responsibility model the customer pays for usage made with its own valid credentials.
- Each person on the team signs in with their work account through Application Default Credentials, so there is no key to copy.
- The app runs under its own service account with only the role needed to call models (roles/aiplatform.user); people get that role through a Google group rather than one by one.
- Keys that cannot go away, such as Stripe or Slack, move to Secret Manager, and old AI Studio keys are deleted.
The guide says the same login works for Gemini, Claude and open models such as gpt-oss in Model Garden; partner models like Claude must be enabled once in each project. Google also describes a spend cap budget, in Preview, that pauses new requests to one service in one project once its estimated spend passes the amount you set. Google adds that enforcement is not instant and that any overage is billed as normal.
What it means for you
The studio’s noteFor small teams running AI experiments on a shared key, the first step may be finding where the keys live: .env files, chat history, the repository. Moving people and the app to separate identities, and adding a real spending limit next to the budget alert, limits what a leaked key can cost. The spend cap is in Preview; check its terms in Google’s current documentation.