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.

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
Send a request to a Gemini model with just a few lines of code

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 and setting granular file access controls using Firebase Security Rules.

Built-in protection for backend resources

Firebase 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
Firebase AI Logic supports hybrid inference for Apple, Android, and Web apps

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

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

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

Easily build rich, conversational audio and video AI experiences in your apps with the Gemini Live API.

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

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

Use Firebase 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.

Pricing

Firebase AI Logic is a no-cost service, billed according to current Google Cloud or Gemini Developer API pricing.