firebase-ai-logic-basics

Integrates Firebase AI Logic Gemini API into web, iOS, Android, and Flutter applications.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill firebase-ai-logic-basics-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: firebase-ai-logic-basics
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/antigravity/plugins/firebase/skills/firebase_ai_logic_basics
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill firebase-ai-logic-basics-ferrarifankid04

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adding generative AI to mobile and web apps normally requires managing backend infrastructure and API keys. This Skill guides you through integrating Firebase AI Logic so you can call Gemini models directly from client-side SDKs without a dedicated backend. ## Core Features & Use Cases - Setup & Provisioning: Walks through installing the Firebase CLI, running firebase-tools init ailogic, and choosing between the Gemini Developer API and Vertex AI Gemini API. - Multimodal Inference: Covers text generation, image/audio/video/PDF input, streaming responses, multi-turn chat sessions, image generation, and structured JSON output. - Security & Production: Enforces App Check setup and Remote Config for model names to protect API quota and simplify updates. - Use Case: You are building a Flutter app that summarizes user-uploaded photos. The Skill provides the exact firebase_ai Dart code, model selection guidance (gemini-flash-latest), and the mandatory CLI provisioning step to avoid PERMISSION_DENIED errors. ## Quick Start Ask the AI to set up Firebase AI Logic in your web app and generate text with the Gemini Developer API.

Frequently Asked Questions about firebase-ai-logic-basics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Gemini AI to my web app with Firebase?

Install the Firebase Web SDK, run npx firebase-tools init ailogic to provision the service, then call getAI and getGenerativeModel from firebase/ai. The Gemini Developer API is the default backend and requires no dedicated server.

Gemini Developer API vs Vertex AI Gemini API, which should I use?

Use the Gemini Developer API by default since it offers a free tier for prototyping and pay-as-you-go pricing. Choose the Vertex AI Gemini API only when you need enterprise-grade scale and are on the Blaze plan.

Why do I get PERMISSION_DENIED with Firebase AI Logic in Flutter?

PERMISSION_DENIED occurs because flutterfire configure only handles client configuration and does not enable the AI service. You must run npx firebase-tools init ailogic to provision the backend before using the firebase_ai package.

Does Firebase AI Logic support image and PDF input?

Yes, Gemini models accept images, audio, video, and PDFs passed as inline base64 data with their MIME type. Files larger than 20 megabytes should be stored in Cloud Storage for Firebase and referenced by URL to avoid HTTP 413 errors.

Is App Check required for Firebase AI Logic?

Yes, App Check is a critical requirement before using AI Logic in production. It prevents unauthorized clients from consuming your API quota and accessing backend resources, and can be configured with reCAPTCHA Enterprise on web.