An app you built in Google AI Studio can go live in two ways. The first is the Publish button in the top-right corner of Build mode, which puts the app on Cloud Run. If your personal account qualifies for the Google Cloud Starter Tier, you can publish up to 2 apps without creating a Google Cloud project or a billing account, and you get a your-app-name.ai.studio address. Google Workspace accounts and accounts with past paid billing usually don't qualify and have to attach billing and publish from a paid Google Cloud project. The second way is to download the code as a ZIP or sync it to GitHub and run it on your own host, such as RoamerHost's Vibe Coding Hosting.
Whichever route you take, one thing has to be right: your Gemini API key belongs on the server, never in frontend code. This guide covers the official publishing conditions and costs, the steps for hosting the app yourself, and how to handle the key.
Conditions and prices for Google AI Studio, the Google Cloud Starter Tier and Cloud Run come from Google's official documentation, checked on November 11, 2026. Google changes these often, so the official pages take precedence. Prices are in USD before tax.
What AI Studio actually builds for you
Describe an app in AI Studio's Build mode and it generates a complete web application: a React frontend by default, plus a Node.js server that can make secure API calls, connect to databases and use npm packages. When you need storage or sign-in, it can set up Firebase Firestore and Google sign-in for you, and it can wire up Google Workspace APIs such as Gmail, Sheets and Calendar, handling the OAuth setup itself.
That frontend-plus-server structure matters. Google's docs state that new web apps store your GEMINI_API_KEY as a server-side secret, injected only into the server runtime and never included in browser code. Apps built before May 14, 2026 get upgraded to the server-side pattern the next time you modify their Gemini features. You can read the code in the Code tab of the preview panel, download it as a ZIP, or link a GitHub repository from the GitHub tab in Settings for two-way sync.
Route one: Publish from AI Studio to Cloud Run
There are two official ways to publish. The Starter Tier is a Google-managed, no-cost project that needs no payment method and has no fixed expiration. Its limits: up to 2 published apps per project, all in a single Cloud Run region, and a free subdomain on ai.studio handed out first come, first served. Unpublish or delete an app and its name is released for anyone to claim. With 2 apps already live, you have to unpublish one or move to a paid project before publishing a third.
Eligibility is where most people get stuck. Google lists the cases where an account may not qualify: signing in with a Google Workspace account (paid, free, Education or Nonprofits), having an active or past paid Google Cloud billing account, or not having enough account activity for Google to decide yet. The docs add that AI Studio support can't override eligibility. If you don't qualify, you attach billing and publish from a paid Google Cloud project. In practice, anyone signed in with a company account may never see the free option.
A paid project means creating a Cloud Billing account and accepting the Google Cloud Terms of Service. The Starter Tier project converts in place and keeps its published apps and addresses. Custom domains, higher quotas, more compute and other Google Cloud products all require this route. Once billing is attached, the account no longer qualifies for the Starter Tier.
Domains come with their own limits. According to the docs, custom domains only work with web apps on paid projects, and for now only with domains bought inside AI Studio: registration starts at US$12 a year depending on the extension, plus a Cloud DNS managed zone from US$0.20 a month and query fees. Connecting or transferring a domain from another registrar is listed as planned, not available yet. Domain purchases are non-refundable once registered.
What it costs: free quotas, Cloud Run and the Gemini API
With no billing attached, a Starter Tier app that hits its no-cost quota pauses until the quota resets or you upgrade the project; you aren't charged automatically. The docs don't publish the specific Starter Tier quota numbers. Paid projects pay for Cloud Run usage. Based on us-central1 pricing, request-billed services get the first 180,000 vCPU-seconds, 360,000 GiB-seconds and 2 million requests free each month, with usage-based charges after that and prices that vary by region. A small tool with little traffic may stay inside the free allowance; an app people use all day needs its own estimate.
The cost people overlook is the Gemini API. Google is explicit that once the app is on Cloud Run, every user's Gemini calls go through your API key and count against your limits, and paid models are billed to you. Free hosting doesn't make the whole app free. Here are the three options side by side:
| Option | Billing | Address and domain | Watch out for |
|---|---|---|---|
| AI Studio publish, Starter Tier | None; no cost, with quotas | name.ai.studio, no custom domain | Account must qualify, 2 apps max, service pauses at quota |
| AI Studio publish, paid project | Required; Cloud Run usage billing | Custom domains, currently only ones bought in AI Studio | Gemini API usage on top; cost grows with traffic |
| Download code, run on Vibe Coding Hosting | Fixed yearly fee, from NT$299 a month | name.roamerhost.com, plus one domain from any registrar | One site per plan; you manage the Gemini key and usage |
Route two: download the code and host it yourself
Google's FAQ answers the question of running apps outside AI Studio directly: yes, download the ZIP, host it elsewhere and set the GEMINI_API_KEY environment variable on your host. Because Gemini calls are made from server-side code, the key stays hidden from users. Here's how it works on Vibe Coding Hosting.
1. Pick how the code gets there
GitHub is the smoothest. Link the app to a GitHub repo in AI Studio's settings, then connect the same repo on your Vibe Coding Hosting project page. From then on, every change you make in AI Studio and push to GitHub redeploys the site automatically. Private repos work too: add the deploy key from the project page to GitHub without write access. The setup mirrors the Lovable flow in our guide to deploying a Lovable site with GitHub. If you'd rather skip GitHub, upload the downloaded ZIP in the dashboard. If you use Gemini CLI, Claude Code or Codex, create a token on the project page, paste it into your tool and let it deploy over MCP.
2. Check the start command and port
When the platform sees package.json, it treats the project as Node.js and installs, builds and starts it for you. Before going live, open package.json and check the build and start scripts and the port the server listens on. Vibe Coding Hosting expects your app to listen on 0.0.0.0 and the PORT environment variable; if the port is hard-coded, ask your AI to read process.env.PORT instead. A failed deploy leaves the previous version online, and the deployment log tells you why.
3. Set your environment variables
Set GEMINI_API_KEY in the project page's environment variables, along with any third-party keys you kept in AI Studio's Secrets panel. Variables are stored encrypted and never shown again after saving, and the MCP tools return names only, never values. A .env file inside the ZIP is not deployed.
4. Reconnect Firebase and Google sign-in
If the app uses Firestore and Firebase sign-in, your data stays in your Firebase project and the app reaches it over the network. Once the address changes, add the new domain to the authorized domains in Firebase's Authentication settings, or Google sign-in will fail. For Google Workspace integrations that AI Studio wired up automatically, such as Gmail or Sheets, the docs don't say how OAuth carries over outside AI Studio. If you rely on them, run the full sign-in and consent flow on a test address first, and be ready to create your own OAuth client in a Google Cloud project with the new callback URL.
5. Add your domain and test
You get name.roamerhost.com with SSL from the start. To use your own domain, add it on the project page, create the DNS records shown, and SSL is issued once verification passes. The domain can come from any registrar, one per plan. Before launch, try the main features on desktop and mobile, especially anything that calls Gemini.
Keep the API key off the frontend
If the key appears anywhere in the JavaScript a browser downloads, anyone can find it with developer tools and run up charges on your account. The two common mistakes are writing the key straight into a React component and putting it in a variable prefixed with VITE_ or NEXT_PUBLIC_. Those variables are designed to be bundled into the frontend, and Vibe Coding Hosting even passes them from .env into the build automatically, so a Gemini key must never use those prefixes.
The right pattern is for the browser to call a URL on your own server, and for the server to call Gemini with the key from its environment and send the result back. New AI Studio apps are already written this way. Roughly:
// Server (Node.js): the key only comes from the environment
app.post('/api/ask', async (req, res) => {
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
// check sign-in and rate limits before calling Gemini
...
});
// Frontend (React): calls your own URL and never sees the key
await fetch('/api/ask', { method: 'POST', body: JSON.stringify({ prompt }) });
Hiding the key on the server isn't the end of it. Anyone can call your /api/ask endpoint, which still spends your quota, so require sign-in or at least rate-limit by visitor IP. The default address runs through Cloudflare, so read the real visitor IP from the CF-Connecting-IP header. It's also worth restricting the key in the Google Cloud console so it can only call the Gemini API, and setting a budget alert. For older apps built before May 2026, search the frontend for direct Gemini calls and have AI Studio or your own AI move them to the server before you deploy.
When moving out isn't the right call
AI Studio publishing is tightly tied to Google Cloud. If your app leans heavily on other Google Cloud products, needs a GPU, must scale out to many instances with traffic, or you want lots of apps under one account, look for a service built for that or stay on Google Cloud. Vibe Coding Hosting runs one site per plan, doesn't run Dockerfiles, and doesn't support long-running background workers, your own Redis or MongoDB, or remote command execution. External services you reach over the network, like Firestore or Supabase, keep working.
If what you built in AI Studio is really a company page or an event page with no backend and no sign-in, WP × Roamer AI makes a brand site or blog much easier to keep updated. For how hosting types split the work, see shared hosting, VPS and managed hosting compared.
Which route fits
If you've made a small tool for yourself or a few friends and your account qualifies for the Starter Tier, publishing from AI Studio is the fastest path. If you're on a company Workspace account without the free option, and you want your existing domain, a fixed yearly price in Taiwan dollars, invoices and support in Chinese, sync the code to GitHub and run it on Vibe Coding Hosting Basic, from NT$299 a month (NT$3,588 billed yearly); every change you push from AI Studio goes live automatically. If deployment errors aren't your thing and you'd like to keep changing the app by chatting with an AI after launch, choose Vibe Coding Hosting Pro, averaging NT$999 a month billed yearly. It includes Roamer AI, which does its best with migrated code but can't guarantee results. Compare both on Vibe Coding Hosting plans and pricing.
Frequently asked questions
Q: Does deploying a Google AI Studio app cost money?
It depends on your account. A personal account that qualifies for the Starter Tier can publish 2 apps at no cost without billing, and the service pauses when quotas run out. Otherwise you publish from a paid Google Cloud project and pay for Cloud Run usage beyond a monthly free allowance. Either way, your users' Gemini calls are billed to your API key.
Q: Why don't I see the free publishing option?
Most often because you're signed in with a Google Workspace account, or the account has had paid Google Cloud billing. Google says support can't change eligibility, so the options are attaching billing for a paid project or downloading the code and hosting it elsewhere.
Q: Can an app published from AI Studio use my own domain?
Yes, on a paid project, but the docs say only domains bought inside AI Studio work for now; domains from other registrars can't be connected yet. On Vibe Coding Hosting you can attach a domain from any registrar, one per plan.
Q: The downloaded ZIP won't run on another host. What usually goes wrong?
The usual suspects are a missing GEMINI_API_KEY environment variable, a server that doesn't listen on the platform's PORT, or a Firebase authorized domain list that doesn't include the new address. The deployment and error logs normally point straight at the cause.
Q: Can I tell the Gemini web app to deploy to RoamerHost directly?
No. The Gemini and ChatGPT web apps can't connect to our MCP server. Use an AI coding tool such as Gemini CLI, Claude Code or Codex, or sync from AI Studio to GitHub, or upload the downloaded ZIP.
Sources
- Google AI Studio: Publish your app in Google AI Studio, Build apps in Google AI Studio, Develop full-stack apps, Custom domains
- Google Cloud: Starter Tier, Cloud Run pricing
- RoamerHost: Vibe Coding Hosting supported stacks and limits