Gemini API로 앱 빌드
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
App Prototyping agent를 사용하여 Gemini API로 새 앱 프로토타입을 자동으로 만들 수 있지만 버튼을 한 번 클릭하여 Gemini 개발자 API로 빈 캔버스를 실행할 수도 있습니다. 필요한 모든 Gemini API 인프라가 포함된 템플릿을 사용하여 앱에서 Google의 최신 생성형 AI 모델을 사용해 보세요. Gemini API 키를 추가하고 코딩을 가져오기만 하면 됩니다.
Gemini API가 미리 로드된 새 앱 빌드
템플릿 대시보드에서 Firebase Studio Gemini API 템플릿에 액세스하고 AI 성능으로 빌드합니다.
- Firebase Studio 템플릿 대시보드에서 Gemini API의 Firebase Studio 템플릿을 엽니다.
- 환경의 언어와 프레임워크를 선택합니다. Firebase Studio의 Gemini API 템플릿은 JavaScript(Vite 또는 Genkit 사용) 및 Python(Flask를 사용한 노트북 또는 웹 앱)에서 사용 가능하며 더 많은 언어와 프레임워크가 곧 지원될 예정입니다.
- (선택사항) LangChain 프레임워크를 앱에 추가하려면 LangChain 사용 옵션을 선택합니다.
- 작업공간이 로드되면
main.js
또는 main.py
파일을 열고 Google AI Studio의 Gemini API 키로 API_KEY
변수를 업데이트합니다.
- 웹 미리보기 패널에서 기본 앱을 테스트하여 Gemini API가 작동하는 모습을 확인하고 그에 따라 새 Gemini API 앱을 수정합니다.
기존 앱에 Gemini API 추가
Firebase Studio에서 Gemini API를 기존 앱에 직접 추가할 수도 있습니다.
Firebase Studio를 엽니다.
탐색 창에서 Firebase Studio 아이콘을 클릭하여 Firebase Studio 패널을 엽니다.
Google 통합 섹션을 펼치고 Gemini API 추가를 클릭합니다.
프롬프트를 따라 계정을 인증하고 Gemini API 키를 앱에 추가합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[null,null,["최종 업데이트: 2025-08-27(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."]]