Google Gemini product ecosystem — Library index

Canonical reference for everything Google ships under the Gemini brand: the Gemini 3.x / 2.5 / 2.0 / 1.5 model line, the Gemini Developer API (AI Studio path) and Vertex AI (enterprise path), the unified google-genai SDK that talks to both, the auxiliary features (context caching, function calling, structured output, code execution, Google Search grounding, long context, embeddings, batch mode, thinking budgets), and the multimodal sister-models (Nano Banana, Imagen, Veo, Lyria, Live API). House style matches the Claude sub-library; every non-obvious claim cites a ai.google.dev doc page, a cloud.google.com/vertex-ai page, or a google-gemini/* GitHub repo. Where the docs are silent but the behavior is observable, the entry is labelled “Undocumented as of 2026-05-25 — observed behavior” so a future reader knows to verify.

This sub-library lives inside Math-and-Compute/Compute/ as a sibling of Claude/, OpenAI/, the Tier3/ folder, and the operating-systems / databases / ML notes. The contents are intentionally version-pinned because the Gemini line moves fast — the 2.5 generation was the production default through most of 2025, the 3.x generation became dominant in 2026, and the 1.5 line is on a deprecation path. Read this index for the map, then drill into the specific note.

See also

  • _index — sister sub-library for Anthropic’s Claude line; many architectural choices mirror each other in inverted form (Gemini’s explicit caching vs Claude’s cache_control breakpoints, etc.)
  • _index — sister sub-library for OpenAI; useful for cross-vendor comparisons (Responses API ↔ generateContent, Realtime ↔ Live API)
  • transformer-architecture — the underlying transformer substrate Gemini is built on
  • rag-embeddings-vector-search — pairs with embeddings-and-vertex-search-gemini.md for RAG patterns
  • inference-optimization — what the serving stack does under the hood (prefix caching, batching, accelerator scheduling)
  • prompt-engineering-agent-systems — vendor-neutral discipline overview

Library contents

Foundations

FileWhat it covers
gemini-models-and-capabilitiesGemini 3.5 Flash / 3.1 Pro / 3 Flash / 3.1 Flash-Lite / 2.5 Pro / 2.5 Flash / 2.5 Flash-Lite, the 1.5 legacy line, pricing per MTok, context windows (1M and 2M), max output, knowledge cutoffs, modality matrix, thinking-mode availability, benchmark snapshots
gemini-api-and-sdksThe Gemini Developer API surface (REST + google-genai Python / Node / Go / Java / C# SDKs), client.models.generate_content shape, streaming, chats, async, AI Studio vs Vertex AI client modes, error model
context-caching-geminiExplicit caching (client.caches.create, TTL, cost-saving guarantee) vs implicit caching (automatic on 2.5+, best-effort), 1,024 / 4,096-token minimums, billing math, hourly storage fee

Tool use & structured output

FileWhat it covers
tool-use-and-function-calling-geminifunction_declarations + function_calling_config (AUTO / ANY / VALIDATED / NONE), parallel calls, compositional calls, automatic function calling in Python SDK, the Gemini 3 unique-id requirement
structured-output-geminiresponse_mime_type: "application/json" + response_schema, Pydantic / Zod integration, enum constraints, propertyOrdering, recursion/array limits, mixing with thinking mode
code-execution-and-grounding-geminiBuilt-in Python sandbox via tools=[{code_execution: {}}] (30s, NumPy / Pandas / Matplotlib / TF / sklearn), Google Search grounding ({google_search: {}}), groundingMetadata shape, billing per-query on Gemini 3, URL context tool

Multimodal & long context

FileWhat it covers
vision-and-long-context-geminiNative PNG / JPEG / WebP / HEIC / HEIF input + 258-tokens-per-tile sizing, PDF / video / audio via Files API, 1M / 2M context tradeoffs, file-API upload limits, video duration limits per model, “needle in haystack” caveats
embeddings-and-vertex-search-geminigemini-embedding-2 (multimodal) + gemini-embedding-001 (text-only legacy), Matryoshka representation (outputDimensionality), task-type enum, Vertex AI Search (managed RAG) + Discovery Engine

Enterprise & operations

FileWhat it covers
vertex-ai-enterprise-geminiVertex AI vs Gemini Developer API split, Model Garden (Claude / Llama / Mistral / 200+ open models on Vertex), regional endpoints, private VPC, IAM, audit logs, supervised + preference tuning, Gemini Enterprise Agent Platform transition
hidden-tricks-and-gotchas-geminiUndocumented patterns, thinking-budget gotchas (2.5 Pro can’t disable, 2.5 Flash can, 3.x uses thinkingLevel instead), implicit-cache invisibility, response-MIME edge cases, Files API expiry, Search-grounding billing change at 3.x, parallel function-call ordering

How to use this library

  1. Picking a model for a new project — start at gemini-models-and-capabilities for the matrix, then context-caching-gemini for the cost model, then tool-use-and-function-calling-gemini if you need tools.
  2. Choosing Developer API vs Vertex AIgemini-api-and-sdks for the surface comparison, vertex-ai-enterprise-gemini for the enterprise-feature delta (private VPC, regional endpoints, IAM, audit logs).
  3. Long-context / video / PDF workvision-and-long-context-gemini first (Files API + token accounting), then context-caching-gemini (caching makes long context economical).
  4. Building grounded agentscode-execution-and-grounding-gemini for google_search + code_execution tools, tool-use-and-function-calling-gemini for custom tools.
  5. Cost optimizationcontext-caching-gemini + batch mode (in gemini-api-and-sdks) + the pricing tables in gemini-models-and-capabilities.
  6. Production / compliance deploymentsvertex-ai-enterprise-gemini is the start; everything else cross-links from there.

Conventions used in this library

  • Model IDs are quoted verbatim with the models/ prefix where the API requires it (e.g. models/gemini-2.5-pro, models/gemini-3.5-flash). The SDK accepts bare IDs; the REST API requires the prefix.
  • Pricing is in USD per million tokens (MTok). Where multiple \$ symbols appear on the same line they are backslash-escaped to avoid Obsidian MathJax interpretation.
  • Code examples use the unified google-genai SDK (the new one as of 2025) — not the legacy google-generativeai package, which is on deprecation track.
  • “Per ai.google.dev 2026-05” tags a claim sourced from official documentation as of the file’s created date.
  • “Per cloud.google.com/vertex-ai/generative-ai/docs 2026-05” tags Vertex-side claims (note: Vertex docs are migrating to the Gemini Enterprise Agent Platform docs site as of 2026; the old URLs redirect).
  • Where Google has rebranded between AI Studio and Gemini Developer API, this library uses Gemini Developer API as the canonical term and notes AI Studio only as the web UI for that API.

Sources read while building this library (2026-05-25 pass)

  • ai.google.dev/gemini-api/docs (root)
  • ai.google.dev/gemini-api/docs/models (model catalog)
  • ai.google.dev/gemini-api/docs/pricing (per-model pricing + tier breakdown)
  • ai.google.dev/gemini-api/docs/quickstart (canonical Python / JS / REST examples)
  • ai.google.dev/gemini-api/docs/caching (explicit + implicit caching mechanics)
  • ai.google.dev/gemini-api/docs/function-calling (function declarations + tool_config modes)
  • ai.google.dev/gemini-api/docs/structured-output (response_mime_type + response_schema)
  • ai.google.dev/gemini-api/docs/vision (image + PDF input, tokens-per-tile)
  • ai.google.dev/gemini-api/docs/long-context (1M / 2M handling tradeoffs)
  • ai.google.dev/gemini-api/docs/code-execution (Python sandbox)
  • ai.google.dev/gemini-api/docs/grounding (Google Search grounding + groundingMetadata)
  • ai.google.dev/gemini-api/docs/embeddings (gemini-embedding-2 + 001, Matryoshka)
  • ai.google.dev/gemini-api/docs/batch-mode (50 % discount, 24h SLA, JSONL format)
  • ai.google.dev/gemini-api/docs/thinking (thinking_budget vs thinkingLevel, summaries)
  • cloud.google.com/vertex-ai/generative-ai/docs (Vertex AI overview — now redirects to Gemini Enterprise Agent Platform)
  • github.com/google-gemini/cookbook (canonical worked examples)
  • github.com/googleapis/python-genai (unified SDK README + API surface)

Sections that required inference (rather than direct doc lookup) are flagged in each file under “Undocumented as of 2026-05-25 — observed behavior” so they can be re-verified later.