Vertex AI overview

Google Cloud · Advanced · 13 min

Generative AI and ML features in Google Cloud apps are built on Vertex AI's models, endpoints and governance.

Vertex AI groups Google Cloud's machine learning services under one API, IAM model and set of quotas.

The main pieces:

  • Generative models: Gemini models, plus partner and open models in Model Garden. Call them through the Google Gen AI SDK (google-genai) with vertexai=True; requests are billed to your project and governed by its IAM, VPC Service Controls and data residency settings.
  • Agent tooling: grounding with Google Search or your own data, function calling, and RAG and agent services for building assistants.
  • Custom training: run your training container or script on managed CPUs, GPUs or TPUs (custom jobs, hyperparameter tuning).
  • Model Registry and endpoints: version models and deploy them for online prediction with autoscaling, or run batch prediction over files in Cloud Storage or tables in BigQuery.
  • Vertex AI Pipelines (Kubeflow Pipelines) for reproducible ML workflows, and Workbench notebooks.

Access is controlled by roles such as roles/aiplatform.user. Generative model availability and quotas vary by region; the global location routes to available capacity. Model IDs change frequently as versions are released and retired, so pin a current one deliberately and watch deprecation notices.

Example

# pip install google-genai   (uses ADC; needs roles/aiplatform.user)
from google import genai

client = genai.Client(vertexai=True, project="shop-dev-4821", location="global")
MODEL = "gemini-2.5-flash"     # pick a current model ID from Model Garden

resp = client.models.generate_content(
    model=MODEL,
    contents="Write a one-line product description for a waterproof hiking boot.",
)
print(resp.text)
# Waterproof, grippy and light: the boot that keeps going when the trail doesn't.
print(resp.usage_metadata.total_token_count)   # billed tokens, e.g. 41

Remember

  • Vertex AI = models, training, endpoints and pipelines under one project's IAM and billing
  • Use the Gen AI SDK with vertexai=True for Gemini on Google Cloud
  • Model IDs and regional availability change; pin and monitor them

Watch out for

  • Hard-coding a preview model ID in production and breaking when it is retired.

Check yourself

  1. What does vertexai=True change when using the Gen AI SDK?

Sign in to answer, see the explanations, and get this lesson back as a quick review later.

Official docs: cloud.google.com/vertex-ai/docs