Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Bien que vous puissiez utiliser App Prototyping agent pour créer automatiquement un prototype d'application avec Gemini API, vous pouvez également lancer un canevas vide avec l'API Developer Gemini en un seul clic. Commencez à utiliser les derniers modèles d'IA générative de Google dans votre application avec un modèle qui inclut toute l'infrastructure Gemini API dont vous avez besoin. Il vous suffit d'ajouter votre clé Gemini API et de commencer à coder.
Créer une application avec Gemini API préchargé
Accédez au modèle Firebase StudioGemini API depuis le tableau de bord des modèles et créez votre contenu grâce à la puissance de l'IA.
Sélectionnez la langue et le framework pour votre environnement. Le modèle Gemini API dans Firebase Studio est disponible en JavaScript (avec Vite ou Genkit) et en Python (notebook ou application Web avec Flask). D'autres langages et frameworks seront bientôt disponibles.
(Facultatif) Si vous souhaitez ajouter le framework LangChain à votre application, sélectionnez l'option Utiliser LangChain.
Une fois votre espace de travail chargé, ouvrez le fichier main.js ou main.py et mettez à jour la variable API_KEY avec votre clé Gemini API depuis Google AI Studio.
Testez l'application de base dans le panneau d'aperçu Web pour voir le Gemini API en action, puis modifiez votre nouvelle application Gemini API en conséquence.
Ajouter Gemini API à une application existante
Vous pouvez également ajouter Gemini API à votre application existante directement depuis Firebase Studio.
Cliquez sur l'icône Firebase Studio dans le volet de navigation pour ouvrir le panneau Firebase Studio.
Développez la section Intégrations Google, puis cliquez sur Ajouter Gemini API.
Suivez les instructions pour authentifier votre compte et ajouter une clé Gemini API à votre application.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/25 (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."]]