컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
항목 Gemini API개에서 Firebase AI Logic 사용 중
plat_ios
plat_android
plat_web
plat_flutter
plat_unity
Firebase AI Logic를 사용하여 Gemini 및 Imagen 모델로 AI 기반 모바일 및 웹 앱과 기능 빌드
Firebase AI Logic를 사용하면 Google의 최신 생성형 AI 모델인 Gemini 모델과 Imagen 모델에 액세스할 수 있습니다.
서버 측이 아닌 모바일 또는 웹 앱에서 직접 Gemini API 또는 Imagen API를 호출해야 하는 경우 Firebase AI Logic 클라이언트 SDK를 사용하면 됩니다. 이러한 클라이언트 SDK는 모바일 및 웹 앱에서 사용하도록 특별히 제작되었으며, 승인되지 않은 클라이언트에 대한 보안 옵션과 다른 Firebase 서비스와의 통합을 제공합니다.
이러한 클라이언트 SDK는 Apple 플랫폼의 경우 Swift, Android의 경우 Kotlin 및 Java, 웹의 경우 JavaScript, Flutter의 경우 Dart, Unity에서 사용할 수 있습니다.
이러한 클라이언트 SDK를 사용하면 앱에 AI 맞춤설정을 추가하고, AI 채팅 환경을 빌드하고, AI 기반 최적화 및 자동화를 만드는 등 다양한 작업을 수행할 수 있습니다.
시작하기
더 많은 유연성 또는 서버 측 통합이 필요하신가요?
Genkit는 Google, OpenAI, Anthropic 등의 모델에 광범위하게 액세스할 수 있는 정교한 서버 측 AI 개발을 위한 Firebase의 오픈소스 프레임워크입니다. 여기에는 더 고급 AI 기능과 전용 로컬 도구가 포함됩니다.
주요 기능
기본 원리
Firebase AI Logic는 클라이언트 SDK, 프록시 서비스, 기타 기능을 제공하여 Google의 생성형 AI 모델에 액세스하여 모바일 및 웹 앱에서 AI 기능을 빌드할 수 있도록 지원합니다.
Google 모델 및 'Gemini API' 제공업체 지원
Google에서는 모든 최신 Gemini 모델과 Imagen 3 모델을 지원하며, 이러한 모델에 액세스하려면 원하는 'Gemini API' 제공업체를 선택하면 됩니다.
Gemini Developer API 및 Vertex AI Gemini API이 모두 지원됩니다. 두 API 제공업체 사용 간의 차이점을 알아봅니다.
Gemini Developer API를 사용하기로 선택한 경우 '무료 등급'을 활용하여 빠르게 시작할 수 있습니다.
모바일 및 웹 클라이언트 SDK
Apple 플랫폼용 Swift, Android용 Kotlin 및 Java, 웹용 JavaScript, Flutter용 Dart, Unity로 제공되는 Firebase AI Logic 클라이언트 SDK를 사용하여 모바일 또는 웹 앱에서 모델에 직접 요청을 보냅니다.
Firebase 프로젝트에 두 Gemini API 제공업체가 모두 설정되어 있는 경우 다른 API를 사용 설정하고 초기화 코드 몇 줄을 변경하기만 하면 API 제공업체 간에 전환할 수 있습니다.
또한 웹용 클라이언트 SDK는 데스크톱의 Chrome에서 실행되는 웹 앱의 하이브리드 및 온디바이스 추론에 대한 실험적 액세스를 제공합니다. 이 구성을 사용하면 앱에서 온디바이스 모델을 사용할 수 있는 경우 온디바이스 모델을 사용하고 필요한 경우 클라우드 호스팅 모델로 원활하게 대체할 수 있습니다.
프록시 서비스
Google의 프록시 서비스는 클라이언트와 선택한 Gemini API 제공업체 (및 Google의 모델) 간의 게이트웨이 역할을 합니다. 모바일 및 웹 앱에 중요한 서비스와 통합을 제공합니다. 예를 들어 선택한 API 제공업체와 백엔드 리소스가 승인되지 않은 클라이언트에 의해 악용되지 않도록 Firebase App Check를 설정할 수 있습니다.
특히 Gemini Developer API를 사용하기로 선택한 경우 이는 매우 중요합니다. Google 프록시 서비스와 이 App Check 통합을 통해 Gemini API 키가 서버에 유지되고 앱의 코드베이스에 삽입되지 않기 때문입니다.
구현 경로
다음 단계
모바일 또는 웹 앱에서 모델에 액세스하는 방법 시작하기
시작 가이드로 이동
지원되는 모델 자세히 알아보기
다양한 사용 사례에 사용할 수 있는 모델과
할당량,
가격을 알아봅니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-19(UTC)
[null,null,["최종 업데이트: 2025-08-19(UTC)"],[],[],null,["Gemini API using Firebase AI Logic \nplat_ios plat_android plat_web plat_flutter plat_unity \nBuild AI-powered mobile and web apps and features with the Gemini and Imagen models using Firebase AI Logic\n\nFirebase AI Logic gives you access to the latest generative AI models from\nGoogle: the Gemini models and Imagen models.\n\nIf you need to call the Gemini API or Imagen API directly\nfrom your mobile or web app --- rather than server-side --- you can use the\nFirebase AI Logic client SDKs. These client SDKs are built\nspecifically for use with mobile and web apps, offering security options against\nunauthorized clients as well as integrations with other Firebase services.\n\n**These client SDKs are available in\nSwift for Apple platforms, Kotlin \\& Java for Android, JavaScript for web,\nDart for Flutter, and Unity.**\n\n\n| **Firebase AI Logic and its client SDKs were\n| formerly called \"Vertex AI in Firebase\".** In May 2025, we [renamed and\n| repackaged our services into Firebase AI Logic](/docs/ai-logic/faq-and-troubleshooting#renamed-product) to better reflect our expanded services and features --- for example, we now support the Gemini Developer API!\n\n\u003cbr /\u003e\n\nWith these client SDKs, you can add AI personalization to apps, build an AI chat\nexperience, create AI-powered optimizations and automation, and much more!\n\n[Get started](/docs/ai-logic/get-started)\n\n\u003cbr /\u003e\n\n**Need more flexibility or server-side integration?** \n\n[Genkit](https://genkit.dev/) is Firebase's open-source\nframework for sophisticated server-side AI development with broad access to\nmodels from Google, OpenAI, Anthropic, and more. It includes more advanced AI\nfeatures and dedicated local tooling.\n\nKey capabilities\n\n|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Multimodal and natural language input | The [Gemini models](/docs/ai-logic/models) are multimodal, so prompts sent to the Gemini API can include text, images, PDFs, video, and audio. Some Gemini models can also generate multimodal *output* . Both the Gemini and Imagen models can be prompted with natural language input. |\n| Growing suite of capabilities | With the SDKs, you can call the Gemini API or Imagen API directly from your mobile or web app to [build AI chat experiences](/docs/ai-logic/chat), [generate images,](/docs/ai-logic/generate-images-imagen) use tools (like [function calling](/docs/ai-logic/function-calling) and [grounding with Google Search](/docs/ai-logic/grounding-google-search)), [stream multimodal input and output (including audio)](/docs/ai-logic/live-api), and more. |\n| Security and abuse prevention for production apps | Use [Firebase App Check](/docs/ai-logic/app-check) to help protect the APIs that access the Gemini and Imagen models from abuse by unauthorized clients. Firebase AI Logic also has [rate limits per user](/docs/ai-logic/faq-and-troubleshooting#rate-limits-per-user) *by default*, and these per-user rate limits are fully configurable. |\n| Robust infrastructure | Take advantage of scalable infrastructure that's built for use with mobile and web apps, like [managing files with Cloud Storage for Firebase](/docs/ai-logic/solutions/cloud-storage), managing structured data with Firebase database offerings (like [Cloud Firestore](/docs/firestore)), and dynamically setting run-time configurations with [Firebase Remote Config](/docs/ai-logic/solutions/remote-config). |\n\nHow does it work?\n\nFirebase AI Logic provides client SDKs, a proxy service, and other features\nwhich allow you to access Google's generative AI models to build AI features in\nyour mobile and web apps.\n\nSupport for Google models and \"Gemini API\" providers\n\nWe support all the latest Gemini models and Imagen 3 models,\nand you choose your preferred \"Gemini API\" provider to access these models.\nWe support both the Gemini Developer API and\nVertex AI Gemini API. Learn about the\n[differences between using the two API providers](/docs/ai-logic/faq-and-troubleshooting#differences-between-gemini-api-providers).\n\nAnd if you choose to use the Gemini Developer API, you can take\nadvantage of their \"free tier\" to get you up and running fast.\n\nMobile \\& web client SDKs\n\nYou send requests to the models directly from your mobile or web app using our\nFirebase AI Logic client SDKs, available in\nSwift for Apple platforms, Kotlin \\& Java for Android, JavaScript for Web,\nDart for Flutter, and Unity.\n\nIf you have both of the Gemini API providers set up in your Firebase\nproject, then you can switch between API providers just by enabling the other\nAPI and changing a few lines of initialization code.\n\nAdditionally, our client SDK for Web offers experimental access to\n[hybrid and on-device inference for web apps](/docs/ai-logic/hybrid-on-device-inference)\nrunning on Chrome on desktop. This configuration allows your app to use the\non-device model when it's available, but fall back seamlessly to the\ncloud-hosted model when needed.\n\nProxy service\n\nOur proxy service acts as a gateway between the client and your chosen\nGemini API provider (and Google's models). It provides services and\nintegrations that are important for mobile and web apps. For example, you can\n[set up Firebase App Check](/docs/ai-logic/app-check) to help protect your\nchosen API provider and your backend resources from abuse by unauthorized\nclients.\n\nThis is particularly critical if you chose to use the\nGemini Developer API because our proxy service and this App Check\nintegration make sure that your Gemini API key stays on the server and\nis *not* embedded in your apps' codebase.\n\nImplementation path\n\n|---|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | Set up your Firebase project and connect your app to Firebase | Use the guided workflow in the [**Firebase AI Logic** page](https://console.firebase.google.com/project/_/ailogic) of the Firebase console to set up your project (including enabling the required APIs for your chosen Gemini API provider), register your app with your Firebase project, and then add your Firebase configuration to your app. |\n| | Install the SDK and initialize | Install the Firebase AI Logic SDK that's specific to your app's platform, and then initialize the service and create a model instance in your app. |\n| | Send prompt requests to the Gemini and Imagen models | Use the SDKs to send text-only or multimodal prompts to a Gemini model to generate [text and code](/docs/ai-logic/generate-text), [structured output (like JSON)](/docs/ai-logic/generate-structured-output) and [images](/docs/ai-logic/generate-images-gemini). Alternatively, you can also prompt an Imagen model to [generate images](/docs/ai-logic/generate-images-imagen). Build richer experiences with [multi-turn chat](/docs/ai-logic/chat), [bidirectional streaming of text and audio](/docs/ai-logic/live-api), and [function calling](/docs/ai-logic/function-calling). |\n| | Prepare for production | Implement important integrations for mobile and web apps, like protecting the API from abuse with [Firebase App Check](/docs/ai-logic/app-check) and using [Firebase Remote Config](/docs/ai-logic/solutions/remote-config) to update parameters in your code remotely (like model name). |\n\nNext steps\n\nGet started with accessing a model from your mobile or web app\n\n[Go to Getting Started guide](/docs/ai-logic/get-started)\n\n\nLearn more about the supported models Learn about the [models available for various use cases](/docs/ai-logic/models) and their [quotas](/docs/ai-logic/quotas) and [pricing](/docs/ai-logic/pricing).\n\n\u003cbr /\u003e"]]