While you can use [the App Prototyping agent](https://firebase.google.com/docs/studio/get-started-ai.md.txt)
to automatically create a new app prototype with the Gemini API, you can
also launch a blank canvas with the
[Gemini Developer API](https://ai.google.dev/) through one click of
a button. Start using the latest generative AI models from Google in your
app with a template that includes all the Gemini API infrastructure you
need. All you need to do is add your
[Gemini API key](https://ai.google.dev/tutorials/setup) and get coding!

## Build a new app with the Gemini API pre-loaded

Access the Firebase Studio Gemini API template from the
templates dashboard and build with the power of AI.

1. Open the [Firebase Studio template for the Gemini API](https://studio.firebase.google.com//new/gemini) from the Firebase Studio template dashboard.
2. Select the language and framework for your environment. The Gemini API template in Firebase Studio is available in JavaScript (with Vite or Genkit) and Python (notebook or web app with Flask).
3. *(Optional)* If you want to add the [LangChain](https://www.langchain.com/) framework to your app, select the **Use LangChain** option.
4. When your workspace loads, open the `main.js` or `main.py` file and update the `API_KEY` variable with your Gemini API key from [Google AI Studio](https://aistudio.google.com/app/apikey).
5. Test the base app in the web preview panel to watch the Gemini API in action, and modify your new Gemini API app accordingly.

## Add the Gemini API to an existing app

You can also add the Gemini API to your existing app directly from
Firebase Studio.

1. Open [Firebase Studio](https://studio.firebase.google.com/).

2. Click the Firebase Studio icon from the navigation pane to open the
   Firebase Studio panel.

3. Expand the **Google Integrations** section and click **Add Gemini API**.

4. Follow the prompts to authenticate your account and add a Gemini API key
   to your app.