> ## AI Agent Context
> Get the complete documentation index at: https://aistudio.google.com/llms.txt
> Use this file to discover all available pages.
> For the full documentation in a single file, fetch: https://aistudio.google.com/llms-full.txt

# Build apps in Google AI Studio

This page describes how to use Google AI Studio to quickly build (or "vibe
code") and deploy apps that test out the latest capabilities of Gemini like
[Nano Banana](/docs/image-generation) and the [Live
API](/docs/live-api). Google AI Studio supports building **web apps**
with full-stack runtimes and **native Android apps** with Kotlin and Jetpack
Compose — all through natural language prompting.

## Get started  {% id="get-started" %}

Start vibe coding in Google AI Studio's [Build mode](https://aistudio.google.com/apps). You can
start building in a few ways:

-   **Start with a prompt**: In Build mode, use the input box to enter a
  description of what you want to build. Select AI Chips to add specific
  features like image generation or Google Maps data to your prompt. You can
  even say what you want using the speech-to-text button.

-   **"I'm Feeling Lucky" button**: If you need a creative spark, use the "I'm
  Feeling Lucky" button, and Gemini will generate a prompt with a project idea
  to get you started.

-   **Remix a project from the gallery**: Open a project from the [App
  Gallery](https://aistudio.google.com/apps?source=showcase) and select **Copy App**.

-   **Import a project from GitHub**: In Build mode, select **Import from GitHub**
  from the **Add files** (+ icon) menu in the prompt input box to import your
  existing code.


Once you run the prompt, you'll see the necessary code and files get generated,
with a live preview of your app appearing on the right-hand side.

## What is created?  {% id="what-is-created" %}

When you run your prompt, AI Studio creates a complete application. You can
choose to build a **web app** or a **native Android app** using the platform
picker.

For **web apps** (default), AI Studio creates a full-stack environment that
includes:

- **Client-side**: A web frontend (React is the default).
- **Server-side**: A Node.js runtime that allows for secure API calls,
  database connections, and npm package usage.

For **Android apps**, AI Studio generates a Kotlin and Jetpack Compose project
that you can preview in a browser-based emulator, install on a physical device,
and publish to the Play Store for testing. [Learn more about building Android
apps](/docs/aistudio-android).

You can view the code that gets generated by selecting the **Code** tab in the
right-hand preview pane. The **Antigravity Agent** intelligently manages
multiple files across your stack, ensuring that changes are propagated
correctly.

### The Antigravity Agent  {% id="antigravity-agent" %}

The **Antigravity Agent** is the main AI functionality within [Google
Antigravity](https://antigravity.google) and now the core components of the
agent harness is powering the Build mode experience in Google AI Studio. It goes
beyond simple code generation by maintaining context of your entire project,
managing multiple files, and understanding complex instructions to build robust,
full-stack applications.

Key capabilities include:

- **Context awareness**: Maintains context of previous prompts and file states.
- **Multi-file management**: Handles dependencies across multiple files.
- **Verified execution**: Verifies code updates to reduce hallucinations.

## Full-stack capabilities  {% id="full-stack" %}

Google AI Studio unlocks the power of the modern web ecosystem, allowing you to
build more than just client-side prototypes.

-   **Server-side runtime & npm**: Use the vast library of npm packages. The
  agent will automatically identify and install packages as needed for your
  app (e.g., specific libraries for data visualization or API clients). You
  can also request specific packages if desired.

-   **Secrets management**: Securely store API keys and secrets in the
  **Settings** menu. These are accessible in your server-side code, keeping
  them safe from client-side exposure.

-   **Multiplayer**: Build real-time collaborative experiences directly within
  AI Studio. The server-side runtime manages the state and connections
  required
  for users to interact together.

-   **Firebase Firestore and Authentication**: Automatically provision and set
  up Firebase, including Firestore database (persistent data storage) and
  Firebase Authentication (sign-in flows, specifically "Sign in with
  Google"). The agent handles the entire setup process and even writes the
  code in your app for these services.

-   **Google Workspace integrations**: Connect your app to Google Workspace
  APIs like Gmail, Sheets, Docs, Drive, Calendar, and more. AI Studio handles
  all the OAuth configuration automatically.


[Learn more about developing full-stack apps](/docs/aistudio-fullstack)

### Android apps  {% id="android" %}

You can also build native Android apps using Kotlin and Jetpack Compose.
Preview your app in a browser-based Android emulator, install it on a physical
device using ADB in the browser, and publish to the Play Store for internal
testing.

AI Studio also integrates with
[Firebase](https://firebase.google.com/docs/ai-assistance/ai-studio-integration)
for Android apps to automatically provision **Firebase AI Logic** and **Firebase
App Check** (for secure client-side Gemini API calls without exposing raw API
keys), as well as **Cloud Firestore** and **Firebase Authentication**.

[Learn more about building Android apps](/docs/aistudio-android)

## Continue building  {% id="continue-building" %}

Once Google AI Studio generates the initial code for your application, you
can continue refining it:

### Build in Google AI Studio  {% id="build-google" %}

-   **Iterate with Gemini**: Use the chat panel in **Build mode** to ask Gemini
  to make modifications, add new features, or change the styling.

-   **Edit the code directly**: Open the **Code tab** in the preview panel to
  make live edits.


### Develop externally  {% id="develop-externally" %}

For more advanced workflows, you can sync or export the code to work in your
preferred environment:

-   **Sync with GitHub**: Connect your app to a GitHub repository to enable
  two-way sync. You can push changes prompted in AI Studio directly to your
  repository with AI-generated commit messages, or pull changes made locally
  in your IDE or by teammates back into AI Studio. Manage your sync status
  anytime in the **GitHub** tab in Settings.

-   **Download and develop locally**: Export the generated code as a **ZIP
  file** and import it into your code editor.


## Key features  {% id="key-features" %}

Google AI Studio includes several features to make the building process
intuitive and visual:

-   **Create and iterate on full stack apps**: Create full stack apps with just
  a prompt and iterate through chat or **annotation mode**. Annotation mode
  lets you highlight any part of your app's UI and describe the
  change you want.

-   **Share and deploy your app**: You can share your creations with others to
  collaborate or showcase your work. When sharing, API calls count toward your
  usage limits. If you use paid models, costs may apply. Then when your app is
  ready, deploy to Cloud Run.

-   **App gallery**: The App Gallery provides a visual library of project ideas.
  You can browse what's possible with Gemini, preview applications instantly,
  and remix them to make them your own.


## Deploy or archive your app  {% id="deploy-or" %}

Once your application is ready, you can deploy it:

-   **Cloud Run**: Deploy your application as a scalable service.
  Pricing for [Google Cloud Run](https://cloud.google.com/run) may apply based
  on usage. To learn more about deployment, see
  [Deploying from Google AI Studio](/docs/aistudio-deploying).

-   **GitHub**: Sync your project with a new or existing GitHub repository to
  manage source code or collaborate with teammates.


## Limitations  {% id="limitations" %}

This section lists current limitations of build mode in Google AI Studio.

### API Key management  {% id="api-key-management" %}

When you create a new web app that uses the Gemini API, AI Studio automatically
configures your Gemini API key as a secret in the app's server-side environment.
You can view and manage this key in the **Secrets** panel.

-   **Automatic setup**: Your `GEMINI_API_KEY` is set up for you — no manual
  configuration is required to start building.

-   **Server-side only**: API keys are injected into the server-side runtime and
  are never included in client-side code.

-   **Existing apps**: For apps built before May 14, 2026, the agent will
  automatically upgrade your Gemini API integration to the recommended
  server-side approach the next time you modify the app's Gemini features.


#### Android apps  {% id="android-api-key-management" %}

When building Android apps, AI Studio uses
[Firebase AI Logic and Firebase App Check](/docs/aistudio-android#firebase-integration)
instead of a raw API key, so credentials are never embedded in your APK.

### Deployment outside Google AI Studio  {% id="deployment-outside-google-ai-studio" %}

-   **Cloud Run**: When you deploy to Cloud Run from AI Studio, your API key is
  included securely in the server-side environment. The deployed app will use
  your API key for all users' Gemini API calls.

-   **ZIP download**: If you download your app as a ZIP file to run it
  elsewhere, you will need to set up the `GEMINI_API_KEY` environment variable
  in your hosting environment. Since your app's Gemini API calls are made from
  server-side code, the key is not exposed to end users.


### Error when sharing apps  {% id="error-when-sharing-apps" %}

If you share your app and your end user runs into a **403 Access Restricted**
error when using the shared URL, it may be due to one of the following:

- **Browser extensions**: Privacy extensions like Privacy Badger may be blocking the app. Disable the extension to avoid the error.
- **Build issues**: There may be issues with the current code. Prompt the
  agent to "fix any build issues with the current code" and then reshare the
  URL.

## FAQ  {% id="faq" %}

### What is Build in AI Studio?  {% id="what-is-build" %}

AI Studio Build is a platform designed to take you from a simple prompt to a
production-ready, AI-powered application using Gemini. Describe what you
want to build with a prompt, and Gemini will generate an app for you. You
can also explore our gallery to see what's possible with the Gemini API,
and remix apps to make them your own.

### How does Build handle my Gemini API key?  {% id="how-api-key" %}

When you create a web app that uses the Gemini API, AI Studio automatically sets
up your Gemini API key as a server-side secret. Your app's Gemini API calls are
made from server-side code using this key, so it is never exposed in the
browser. You can view your API key in the **Secrets** panel in Settings. For
Android apps, AI Studio uses
[Firebase AI Logic and Firebase App Check](/docs/aistudio-android#firebase-integration)
to make secure client-side calls without embedding an API key in the app binary.

### Is my API key exposed when sharing apps?  {% id="api-key-exposed" %}

No. Your API key is stored as a server-side secret and is never included in
client-side code. When you share your app, other users can use it, but they
cannot see your API key.

When sharing your apps with others, API calls count toward your usage limits.
If you use paid models, costs may apply. AI Studio will give you a heads-up
during setup and before you share if your app could incur costs.

### Who can see my apps?  {% id="who-can-see" %}

By default your app is private. You can share your app with other users to
let them use it. Users you share your app with can see its code and fork it
for their own purposes. If you share your app with edit permission, the
other users can edit the code of your app.

### Can I run apps outside of AI Studio?  {% id="run-outside" %}

Yes. You can deploy your app to
[Cloud Run](https://cloud.google.com/run) from AI Studio, which
gives your app a public URL with your API key securely configured in the
server-side environment. You can also download your app as a ZIP file and
host it elsewhere — you'll need to set the `GEMINI_API_KEY` environment
variable in your hosting environment. Since Gemini API calls are made from
server-side code, your key stays secure.

To learn more about deployment options, see [Deploying from Google AI Studio](/docs/aistudio-deploying).

### Can I develop apps locally with my own tools and then share them here?  {% id="locally-develop" %}

Yes. You can connect your AI Studio app to a GitHub repository to develop
locally using your preferred code editor or CLI tools, push your changes to
GitHub, and then pull those updates directly back into AI Studio using the
**GitHub** tab in Settings.

### How can I use a database or other storage with my apps?  {% id="database-storage" %}

AI Studio apps are standard apps running in a Cloud Run container. You can
use any storage solution that you can connect to over a network, so long
as there is not a firewall preventing access from a dynamic IP range.

We are working on adding direct support for storage in the future, which
you will be able to configure directly within AI Studio.

### How can I access the microphone, webcam, and other Navigator APIs?  {% id="navigator-apis" %}

To ensure that viewers are aware of an app’s usage of their webcam or other
devices, we require an extra acknowledgement before the app can access
these [Navigator APIs](https://developer.mozilla.org/en-US/docs/Web/API/Navigator).
App creators can add these permission requests to their app’s
`metadata.json` file. For example:

```json
{
  "name": "My app",
  "requestFramePermissions": [
    "microphone",
    "camera",
    "display-capture",
    "geolocation",
    "bluetooth",
    "clipboard-read",
    "serial",
    "usb"
  ]
}
```

Supported values for `requestFramePermissions` are a subset of the
standard [policy-controlled features](https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md).

### How can I use GitHub with my apps?  {% id="github-integration" %}

AI Studio supports two-way sync with GitHub:

-   **Import a repository**: In Build mode, select **Import from GitHub**
  from the **Add files** (+ icon) menu in the prompt input box to import
  existing code.

-   **Link a repository**: In Settings, open the **GitHub** tab to create a
  new GitHub repository from your app or link to an existing one.

-   **Two-way sync**: Push changes prompted in AI Studio directly to your
  repository with AI-generated commit messages, or pull changes made
  externally (such as local IDE edits or teammate pull requests) back into AI
  Studio.

-   **Resolve merge conflicts**: If changes conflict when syncing with
  GitHub, AI Studio provides a **Resolve conflicts** dialog with a
  side-by-side diff viewer, allowing you to review differences and choose
  whether to keep the AI Studio or GitHub version for each conflicted file.


### Can I give other users edit access to my app?  {% id="edit-access" %}

AI Studio doesn't support direct real-time collaborative editing.
However, you can collaborate with teammates by linking your app to a shared
GitHub repository. Teammates can push changes or open pull requests on GitHub,
and you can pull those updates into AI Studio.

### Why was my app flagged for policy violation?  {% id="policy-violation" %}

We have systems that automatically review apps to ensure they comply with
our policies. If we find that an app violates our policies, the app will
be removed from AI Studio. Policy violations can include, but are not
limited to, the following:

- Apps that contain malware, phishing, or impersonation
- Apps that display or distribute content that violates child sexual abuse imagery policy
- Apps that display or distribute content that violates harassment policy
- Apps that display or distribute content that violates hate speech policy
- Apps that display or distribute content that violates human trafficking policy
- Apps that display or distribute content that violates sexually explicit content policy
- Apps that display or distribute content that violates violence and gore policy
- Apps that display or distribute content that violates harmful or dangerous policy

If your app has been flagged for a policy violation, and you believe it in
error, you can submit an appeal. Repeated violations of our policies may
result in the termination of your access to AI Studio.

### What are my responsibilities as an app developer?  {% id="developer-responsibilities" %}

As a reminder, as the owner of your application, you are responsible for
its behavior and all data it handles. This includes:

-   **Legal Compliance and Third Party Rights:** Ensuring your app complies
  with all applicable laws and regulations and does not violate the rights
  of others, including intellectual property and privacy rights.

-   **Content Monitoring:** Compliance with additional terms may apply to
  other services used by your app. For example,
  [Google Cloud Terms of Service](https://cloud.google.com/terms),
  applicable to Firestore, require customers hosting third-party content to
  publish policies defining what content is prohibited (e.g., illegal
  content) and monitor for presence of that illegal content.

-   **Safe Implementation:** Implementing the necessary safeguards and
  moderation tools to prevent your application from being misused.


Be aware of the [use restrictions](/docs/terms#use-restrictions)
in the Terms of Service.

### What terms apply to apps in the app gallery in AI Studio?  {% id="gallery-terms" %}

The [Gemini API Additional Terms of Service](/docs/terms)
apply to use of apps featured in the app gallery in AI Studio, unless
otherwise noted.

## What's next  {% id="whats-next" %}

- [Developing Full-Stack Apps](/docs/aistudio-fullstack) (web)
- [Build Android Apps](/docs/aistudio-android)
- See examples in the [App Gallery](https://aistudio.google.com/apps?source=showcase).

