Vision

Vision on Google Cloud covers multimodal understanding, generation, editing, embedding, evaluation, and serving workflows for images, video, PDFs, and visual documents using Gemini, Imagen, Veo, Vertex AI, Agent Platform, BigQuery, Cloud Storage, and related SDKs.

Synthesized across 45 notebooks. See the source pages under Notebooks below for line-level grounding.

The Vision notebooks span practical engineering patterns for visual media: asking Gemini questions about images, videos, documents, diagrams, products, calendars, and screenshots; extracting structured fields; generating captions; detecting objects; and grounding answers in provided media.

They also cover production-adjacent workflows: large-scale embedding generation, Vector Search, BigQuery AI functions, batch prediction, prompt optimization, supervised fine-tuning, evaluation with rubrics and autoraters, and deployment of open or partner multimodal models.

The recurring theme is to treat visual AI as a data pipeline, not a single prompt: configure project access, store media reliably, pass explicit MIME-typed inputs, constrain outputs with schemas, evaluate against references, throttle and checkpoint at scale, and clean up billable resources.

Canonical workflow

  1. Enable the required APIs, billing, authentication, project ID, region, and service-account permissions for Vertex AI, Agent Platform, BigQuery, Cloud Storage, or companion APIs.
  2. Stage images, videos, PDFs, captions, labels, and reference data in Cloud Storage or BigQuery, and pass media with explicit MIME types using the SDK-supported URI, bytes, or image object formats.
  3. Choose the right model or service for the task: Gemini for multimodal understanding, Imagen or Gemini image models for image generation and editing, Veo for video generation, embeddings for retrieval or deduplication, and BigQuery AI functions for in-database workflows.
  4. Prototype on one or a few examples before scaling, inspecting the input media, prompt, response parts, parsed output, usage metadata, and visual results.
  5. Use structured output contracts for automation, including JSON response MIME types, response schemas, Pydantic models, enums, closed vocabularies, and parsing functions.
  6. Scale with Batch Prediction, BigQuery, Vector Search, pipelines, Dataflow, multithreading, semaphores, throttling, checkpointing, and per-item error logging.
  7. Evaluate outputs with ground truth, custom metrics, generated rubrics, counterexamples, row-level explanations, validation questions, and manual spot checks.
  8. Optimize, tune, deploy, and clean up: use Prompt Optimizer or supervised fine-tuning when labeled data justifies it, poll long-running jobs, secure serving endpoints, and delete unused endpoints, buckets, experiments, indexes, and datasets.

Best practices

See Vision - Best Practices for the full distilled guide.

  • Pass every non-text input with the correct MIME type, using supported structures such as Part.from_uri, Part.from_bytes, fileData, Image.from_file, gcs_uri images, or BigQuery ObjectRefs.
  • Use response_mime_type=“application/json”, response_schema, Pydantic models, enums, and custom parsers whenever downstream code depends on model output.
  • Set temperature to 0 or a low value for deterministic extraction, classification, scene-boundary detection, attribute labeling, and evaluation comparisons.
  • Ground prompts explicitly: tell the model to use only the provided media or retrieved context, label candidate images, constrain answers to visible evidence, and request no preamble when only the answer is needed.
  • Prototype with a single image, video, document, or prompt before launching batch prediction, tuning, vector indexing, or large generation jobs.
  • Inspect intermediate artifacts: response parts, generated code execution output, parsed JSON, rubrics, validator questions, row-level explanations, visual overlays, captions, and side-by-side edited images.

Key models & APIs

  • Gemini multimodal models: gemini-2.0-flash, gemini-2.0-flash-001, gemini-2.5-flash, gemini-2.5-pro, gemini-3.5-flash, gemini-3.1-pro-preview, gemini-3.1-flash-lite, Gemini image models: gemini-2.5-flash-image-preview, gemini-2.5-flash-image, gemini-3-pro-image, gemini-3.1-flash-image, Imagen models: imagen-3.0-generate-002, imagen-3.0-capability-001, imagen-4.0-generate-001, imagen-4.0-upscale-preview, imagegeneration@006, Veo models: veo-3.1-generate-001, veo-3.1-generate-preview, veo-3.1-fast-generate-preview, Virtual Try-On: virtual-try-on-001, Embedding models: gemini-embedding-001, gemini-embedding-2-preview, multimodalembedding@001, text-embedding-005, google/siglip2-base-patch16-512, Open and partner models on Google Cloud: google/paligemma-3b-mix-448, google/gemma-3-4b-it, claude-3-5-sonnet-v2@20241022, Vertex AI API, Agent Platform API, Google Gen AI SDK, google-cloud-aiplatform, and google-genai, Vertex AI Gen AI Evaluation, EvalTask, Batch Prediction API, Prompt Optimizer, supervised fine-tuning, and Vertex AI endpoints, BigQuery AI functions, BigQuery remote models, BigQuery ObjectRefs, BigQuery VECTOR_SEARCH, BigQuery vector indexes, and Agent Platform Vector Search, Cloud Storage, Cloud Vision API, Cloud Text-to-Speech API, Google Calendar API, Cloud Run GPU, Artifact Registry, Secret Manager, and PyTorch inference DLCs

Notebooks (45)

Embeddings & Vector Search (1)

Gemini (35)

Open Models (2)

Partner Models (1)

Vision (6)


Part of the Generative AI Google Brain · Vision - Best Practices