firebase-ai-logic

Installation
Summary

Client-side Gemini integration for web apps with multimodal inference, streaming, and on-device hybrid execution.

  • Supports text-only and multimodal inputs (images, audio, video, PDFs); files over 20 MB route through Cloud Storage
  • Includes chat sessions with automatic history, streaming responses for real-time display, and structured JSON output enforcement
  • Offers hybrid on-device inference via Gemini Nano in Chrome, with automatic fallback to cloud execution
  • Requires App Check for production security and supports dynamic model versioning through Remote Config to avoid redeployment
  • Choose between Gemini Developer API (free tier, prototyping) or Vertex AI Gemini API (enterprise scale, requires Blaze plan)
SKILL.md

Firebase AI Logic Basics

Overview

Firebase AI Logic is a product of Firebase that allows developers to add gen AI to their mobile and web apps using client-side SDKs. You can call Gemini models directly from your app without managing a dedicated backend. Firebase AI Logic, which was previously known as "Vertex AI for Firebase", represents the evolution of Google's AI integration platform for mobile and web developers.

It supports the two Gemini API providers:

  • Gemini Developer API: It has a free tier ideal for prototyping, and pay-as-you-go for production
  • Vertex AI Gemini API: Ideal for scale with enterprise-grade production readiness, requires Blaze plan

Use the Gemini Developer API as a default, and only Vertex AI Gemini API if the application requires it.

Setup & Initialization

Prerequisites

  • Before starting, ensure you have Node.js 16+ and npm installed. Install them if they aren’t already available.
  • Identify the platform the user is interested in building on prior to starting: Android, iOS, Flutter or Web.
  • If their platform is unsupported, Direct the user to Firebase Docs to learn how to set up AI Logic for their application (share this link with the user https://firebase.google.com/docs/ai-logic/get-started)
Related skills
Installs
34.1K
GitHub Stars
277
First Seen
Feb 17, 2026