GEMINI LABJP
ROBOTICS — The ER 1.6 preview that shut down on August 31 does have a successor. Gemini Robotics ER 2 is in public preview, in both standard and streaming variantsVIDEO — ER 2 judges success and failure from live video rather than still snapshots, which is what lets it catch spills, slips, and misalignments while a task is still runningDEADLINE — Next up is September 30, when gemini-omni-flash-preview is retired. The target is gemini-omni-1.1-flash, GA since August 27, and there are now under four weeks leftAPIKEY — Every remaining standard API key, restricted ones included, stops working during September. The replacement is an auth key bound to a Google Cloud service accountPRICE — Gemini 3.7 Flash keeps its introductory $0.75/$3.75 per 1M through December 31, then moves to $1.50/$7.50 on January 1, 2027. Any estimate crossing the year needs both figuresAUDIO — Gemini 3.5 Transcribe handles language detection across 85+ languages, speaker diarization, word-level timestamps, and custom vocabulary biasing of up to 1,000 termsROBOTICS — The ER 1.6 preview that shut down on August 31 does have a successor. Gemini Robotics ER 2 is in public preview, in both standard and streaming variantsVIDEO — ER 2 judges success and failure from live video rather than still snapshots, which is what lets it catch spills, slips, and misalignments while a task is still runningDEADLINE — Next up is September 30, when gemini-omni-flash-preview is retired. The target is gemini-omni-1.1-flash, GA since August 27, and there are now under four weeks leftAPIKEY — Every remaining standard API key, restricted ones included, stops working during September. The replacement is an auth key bound to a Google Cloud service accountPRICE — Gemini 3.7 Flash keeps its introductory $0.75/$3.75 per 1M through December 31, then moves to $1.50/$7.50 on January 1, 2027. Any estimate crossing the year needs both figuresAUDIO — Gemini 3.5 Transcribe handles language detection across 85+ languages, speaker diarization, word-level timestamps, and custom vocabulary biasing of up to 1,000 terms
Articles/Advanced
Advanced/2026-03-25Advanced

Building Serverless AI Apps with Firebase Genkit and Gemini — An Implementation Notebook

A hands-on implementation notebook for building serverless AI apps with Firebase Genkit and Gemini. Flows, agents, and RAG on the current Genkit 1.x API, plus per-flow usage logging that turns spend into an itemized bill, the gaps between the Dev UI and production, and cold-start tuning.

Firebase Genkit2Gemini83ServerlessAI9Development

Premium Article

Shipping one Flow, and why the framework's thinness matters

When I first picked up Firebase Genkit, I was wary. Running Dolice Labs as an indie developer, every new abstraction layer is something to learn, and a tool that doesn't earn its keep becomes a liability.

That wariness lifted when I ran a tiny Flow — one that just returns a greeting — in the local Dev UI, and then deployed the exact same code to Cloud Functions. Input and output schemas, local testing, tracing, deployment: all of it sits inside one consistent way of writing. Because the framework is thin, you get to focus on the Gemini call itself.

This is an implementation notebook that walks from that first Flow all the way to RAG and agents, using code I actually wrote and verified. It isn't a line-by-line translation of the docs; it centers on the places an indie developer tends to get stuck. Note that this is a fast-moving area — the examples here assume the 1.x genkit() constructor and zod schemas.

Install and initialize — consolidate in one place

Install Genkit and the Google AI plugin. TypeScript is the natural choice.

npm install genkit @genkit-ai/googleai
npm install -D typescript tsx @types/node

Consolidate initialization into a single file and import ai from it everywhere else, so swapping models is a one-line change.

// src/genkit.ts
import { genkit } from "genkit";
import { googleAI } from "@genkit-ai/googleai";
 
// Swap the model ID for whichever you want (a current Flash / Pro model)
export const ai = genkit({
  plugins: [googleAI({ apiKey: process.env.GOOGLE_API_KEY })],
  model: googleAI.model("gemini-2.5-flash"),
});

Never hardcode apiKey; always pass it from the environment. Use .env locally, and the Secret Manager path shown below in production.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Copy-runnable Flow, Tool, and RAG code written against the current Genkit 1.x API (the genkit constructor and zod schemas)
A usage-logging wrapper and aggregation script that report cost per 1,000 calls, plus how to cut the input-token tail
How to isolate the four things that pass in the Dev UI but break in production, and when a minimum instance is worth paying for
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $15 for lifetime access
View Membership →

Related Articles

Advanced2026-03-16
Accelerate note Monetization with Aqua Voice × Gemini:
Combine voice input and AI to streamline article creation and monetization on note. Master the complete workflow from Aqua Voice to Gemini Advanced.
Advanced2026-07-10
My ADK Assistant Quietly Forgot a Deadline — Catching Compaction Memory Loss With a Recall Probe
Compacting conversation history in Google ADK with Gemini lowers cost, but it also erodes what your assistant remembers — silently. Here is how I built a recall probe to measure that loss, compared three compaction strategies against the same ledger, and stopped trading memory for tokens.
Advanced2026-06-27
Don't Ingest Gemini Deep Research Reports Blindly — A Citation-Verification Acceptance Gate for MCP-Grounded Research
Now that Deep Research connects to MCP servers and File Search, you can ground research on your own data. This builds an acceptance gate that verifies, before any automated ingest, whether each citation resolves to a trusted source — with an allowlist, a grounding-coverage ratio, and categorized reject reasons, all in working code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →