You can now use Gemini 4 Argon client-side to build Android, iOS, Flutter, Unity, and web apps via Firebase AI Logic. [Learn more.](https://firebase.google.com/docs/ai-logic/models)

##### Firebase AI Logic

# Build generative AI features directly into your mobile and web apps

## Call the Gemini API client-side from your Android, Flutter, iOS, Web, Unity, and React Native apps. Start at no-cost with the Gemini Developer API, or use the Gemini Enterprise Agent Platform for scalability and compliance.

[Get started](https://console.firebase.google.com/project/_/ailogic) [View docs](https://firebase.google.com/docs/ai-logic)

### Access the latest Gemini models without server-side setup

Firebase AI Logic is a production-ready managed service that allows you to securely call the Gemini API via client SDKs in your native stack---no context-switching to a backend language required. These client SDKs are built for use with mobile and web apps. You can use them to add AI personalization, AI chat, generate images, and integrate tools like Grounding with Google Search or Google Maps to enhance your app experience.
![Flow chart depicting Firebase AI Logic giving client-side access to Gemini models](https://firebase.google.com/static/images/products/firebase-ai-logic/access-gemini-models-2x.png) ![Send a request to a Gemini model with just a few lines of code](https://firebase.google.com/static/images/products/firebase-ai-logic/simple-setup-2x.png)

### Simple setup, robust infrastructure

Get started quickly by enabling your Gemini API provider in the Firebase console. Then, with just a few lines of code, you or your preferred coding agent can build multimodal AI features directly in your app. Take advantage of scalable infrastructure by efficiently uploading and managing files with [Cloud Storage for Firebase](https://firebase.google.com/products/storage) and setting granular file access controls using Firebase Security Rules.

### Built-in protection for backend resources

[Firebase App Check](https://firebase.google.com/products/app-check) is deeply integrated with Firebase AI Logic to add a layer of protection for your Gemini API calls. You can confidently use these SDKs from your client without worrying about unauthorized access.
![Firebase App Check is integrated with Firebase AI Logic to protect your Gemini API calls](https://firebase.google.com/static/images/products/firebase-ai-logic/built-in-protection-2x.png) ![Firebase AI Logic supports hybrid inference for Apple, Android, and Web apps](https://firebase.google.com/static/images/products/firebase-ai-logic/seamless-inference-2x.png)

### Seamless on-device and in-cloud model inference

Build AI-powered features for Apple, Android, and Web apps with hybrid inference. Hybrid inference lets you run inference using on-device models when available, for enhanced privacy, no-cost inference, and offline functionality, and seamlessly falling back to cloud-hosted models if an on-device model isn't available (and vice versa).

### Everything you need to power client-side AI features quickly and securely

![Rapid and secure iteration](https://firebase.google.com/static/images/products/firebase-ai-logic/rapid-secure-iteration-2x.png) Rapid and secure iteration
Store your prompts, model configuration, system instructions, and output schemas securely on Firebase servers. Make updates from the Firebase console and the change will roll out instantly without requiring you to release a new version of your app.
![AI monitoring](https://firebase.google.com/static/images/products/firebase-ai-logic/ai-monitoring-2x.png) AI monitoring
Monitor every Gemini API call in the Firebase console. Understand the health of your AI features by tracking latency and token usage. You can even inspect traces when a user gets an unexpected response for faster debugging.
![Support for the Live API](https://firebase.google.com/static/images/products/firebase-ai-logic/live-api-2x.png) Support for the Live API
Easily build rich, conversational audio and video AI experiences in your apps with the Gemini Live API.
![Run custom server-side workflows](https://firebase.google.com/static/images/products/firebase-ai-logic/custom-logic-2x.png) Run custom server-side workflows
Use Cloud Functions for Firebase to set up custom logic and trigger workflows. Block specific keywords, enforce rate limits, remove data, or even append context to prompts.
![Enterprise-grade AI safety](https://firebase.google.com/static/images/products/firebase-ai-logic/ai-safety-2x.png) Enterprise-grade AI safety
Integrate with Model Armor for enterprise-grade safety---with protection against toxic content, PII leaks, and other risks when you access Gemini models via the Gemini Enterprise Agent Platform.
![Dynamic A/B Testing](https://firebase.google.com/static/images/products/firebase-ai-logic/ab-testing-2x.png) Dynamic A/B Testing
Use
[Firebase Remote Config](https://firebase.google.com/products/remote-config)
to test and change AI parameters without releasing a new app version. Swap models, dynamically edit prompts, and more.

### Documentation

Learn more about Firebase AI Logic through our documentation.
[View docs](https://firebase.google.com/docs/ai-logic)

### Pricing

Firebase AI Logic is a no-cost service, billed according to current [Google Cloud or Gemini Developer API pricing](https://firebase.google.com/docs/ai-logic/pricing?api=dev#pricing).
[View pricing](https://firebase.google.com/pricing#firebase-ai-logic) Try Firebase today


Integrating it into your app is easy.
[Get started](https://console.firebase.google.com/)

#### All Firebase products

##### Build

- [App Check](https://firebase.google.com/products/app-check)
- [App Hosting](https://firebase.google.com/products/app-hosting)
- [Authentication](https://firebase.google.com/products/auth)
- [Cloud Functions](https://firebase.google.com/products/functions)
- [Cloud Storage](https://firebase.google.com/products/storage)
- [SQL Connect](https://firebase.google.com/products/sql-connect)
- [Extensions](https://firebase.google.com/products/extensions)
- [Firestore](https://firebase.google.com/products/firestore)
- [Hosting](https://firebase.google.com/products/hosting)
- [Phone Number Verification](https://firebase.google.com/products/phone-number-verification)
- [Realtime Database](https://firebase.google.com/products/realtime-database)
- [Firebase AI Logic](https://firebase.google.com/products/firebase-ai-logic)

[Generative AI](https://firebase.google.com/products/generative-ai)

##### Run

- [A/B Testing](https://firebase.google.com/products/ab-testing)
- [App Distribution](https://firebase.google.com/products/app-distribution)
- [Cloud Messaging](https://firebase.google.com/products/cloud-messaging)
- [Crashlytics](https://firebase.google.com/products/crashlytics)
- [Google Analytics](https://firebase.google.com/products/analytics)
- [In-App Messaging](https://firebase.google.com/products/in-app-messaging)
- [Performance Monitoring](https://firebase.google.com/products/performance)
- [Remote Config](https://firebase.google.com/products/remote-config)
- [Test Lab](https://firebase.google.com/products/test-lab)