Feature Request for Google AI Studio
Enable a “Bring Your Own Key” (BYOK) for Apps Built with AI Studio
Background: As a developer and consultant, I use the “Build” feature within Google AI Studio to rapidly create AI-powered web applications. My goal is to deploy these generated apps and provide them to my clients for their own use.
The Current Problem: The apps generated by AI Studio are designed to use my developer’s API key by default. When I publish or deploy one of these apps for clients to use, all billable Google API calls made by that client are billed back to my account. That is not my business model: clients should pay for their usage of the API, not me.
There is currently no easy way for these AI Studio-generated apps that allows the end-user (my client) to enter and use their own API key. The current workflow is very cumbersome:
- I have to export my app code as a zip-file
- then transfer this file to my clients
- they need to import it in Google AI Studio, which is quite complex
- they then deploy it to their own Cloud Run account, and share the URL to their users
This is a critical blocker. It makes AI Studio’s powerful “Build” feature almost unusable for any B2B business model where the end-user is supposed to pay for their own consumption. As other developers have noted, this forces the developer to risk being bankrupted by their own app’s users (https://discuss.ai.google.dev/t/i-need-users-to-provide-their-own-api-key-but-this-isnt-allowed-any-more/107950).
Proposed Solution: Introduce a new setting within the AI Studio “Build” or “Publish” workflow, such as a checkbox: [ ] Enable End-User API Key Mode.
When an app is generated with this setting enabled, the deployed app should:
-
On first load, automatically check if an API key is present in the user’s environment.
-
If no key is found, the app should display a simple, standardized, and trusted modal dialog (e.g., “Please enter your Google AI API key to use this application”).
-
Upon entry, the app should securely save this key.
-
All API calls from the application should then use this user-provided key, ensuring the end-user is billed for their own usage.
Benefits:
-
Unlocks a Business Model: This immediately makes the “Build” feature viable platform for developers who build tools for clients.
-
Solves the Billing Problem: It correctly assigns API costs to the end-user who is incurring them.
-
Maintains Simplicity: It requires no extra work manual from the developer or client; it’s just a setting that enables a pre-built, secure component in the final app. This aligns with the “vibe coding” ethos of building apps without “juggling with API keys” (https://blog.google/technology/developers/introducing-vibe-coding-in-google-ai-studio/).