Compila una app con la API de Gemini
Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Si bien puedes usar App Prototyping agent para crear automáticamente un nuevo prototipo de app con Gemini API, también puedes iniciar un lienzo en blanco con la API de Gemini para desarrolladores con un solo clic. Comienza a usar los modelos de IA generativa más recientes de Google en tu app con una plantilla que incluya toda la infraestructura de Gemini API que necesitas. Solo debes agregar tu llave Gemini API y comenzar a escribir código.
Compila una app nueva con Gemini API precargada
Accede a la plantilla Gemini API de Firebase Studio desde el panel de plantillas y compila con el poder de la IA.
- Abre la plantilla Firebase Studio para Gemini API desde el panel de plantillas Firebase Studio.
- Selecciona el lenguaje y el framework de tu entorno. La plantilla Gemini API en Firebase Studio está disponible en JavaScript (con Vite o Genkit) y Python (notebook o app web con Flask), y pronto se agregarán más lenguajes y frameworks.
- (Opcional) Si quieres agregar el framework de LangChain a tu app, selecciona la opción Usar LangChain.
- Cuando se cargue tu espacio de trabajo, abre el archivo
main.js
o main.py
y actualiza la variable API_KEY
con tu clave Gemini API de Google AI Studio.
- Prueba la app base en el panel de vista previa web para ver el Gemini API en acción y modifica tu nueva app de Gemini API según corresponda.
Agrega la Gemini API a una app existente
También puedes agregar la Gemini API a tu app existente directamente desde Firebase Studio.
Abre Firebase Studio.
Haz clic en el ícono Firebase Studio del panel de navegación para abrir el panel Firebase Studio.
Expande la sección Integraciones de Google y haz clic en Agregar Gemini API.
Sigue las indicaciones para autenticar tu cuenta y agregar una clave de Gemini API a tu app.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2025-08-22 (UTC)
[null,null,["Última actualización: 2025-08-22 (UTC)"],[],[],null,["While you can use [the App Prototyping agent](/docs/studio/get-started-ai)\nto automatically create a new app prototype with the Gemini API, you can\nalso launch a blank canvas with the\n[Gemini Developer API](https://ai.google.dev/) through one click of\na button. Start using the latest generative AI models from Google in your\napp with a template that includes all the Gemini API infrastructure you\nneed. All you need to do is add your\n[Gemini API key](https://ai.google.dev/tutorials/setup) and get coding!\n\nBuild a new app with the Gemini API pre-loaded\n\nAccess the Firebase Studio Gemini API template from the\ntemplates dashboard and build with the power of AI.\n\n1. Open the [Firebase Studio template for the Gemini API](https://studio.firebase.google.com//new/gemini) from the Firebase Studio template dashboard.\n2. 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), with more languages and frameworks coming soon.\n3. *(Optional)* If you want to add the [LangChain](https://www.langchain.com/) framework to your app, select the **Use LangChain** option.\n4. 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).\n5. Test the base app in the web preview panel to watch the Gemini API in action, and modify your new Gemini API app accordingly.\n\nAdd the Gemini API to an existing app\n\nYou can also add the Gemini API to your existing app directly from\nFirebase Studio.\n\n1. Open [Firebase Studio](https://studio.firebase.google.com/).\n\n2. Click the Firebase Studio icon from the navigation pane to open the\n Firebase Studio panel.\n\n3. Expand the **Google Integrations** section and click **Add Gemini API**.\n\n4. Follow the prompts to authenticate your account and add a Gemini API key\n to your app."]]