Leaders Insights
Leaders Insights

Rester au meilleur niveau, un peu chaque jour.

DomainesMarketingDataFinanceIA
RessourcesApprendreTestOutilsBlogGlossaire
© 2026 Leaders Insights — Tous droits réservés.
Formations/AI Essentials/Gemini & Google AI/Building deeper: tools, RAG, and files/Vertex AI: taking Gemini to production
3/3+180 XP

Building deeper: tools, RAG, and files

1Function calling and structured outputs+2002Files, embeddings, and RAG with Google+1903Vertex AI: taking Gemini to production+180

Vertex AI: taking Gemini to production

# Vertex AI: taking Gemini to production

Vertex AI is where your Gemini prototype stops being a clever demo and becomes a system your company can actually trust with real users, real data, and real money. You have been calling Gemini through the Gemini APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → and Google AI Studio. That path is perfect for building and iterating fast. But the moment your project needs enterprise security, regional data control, audit trails, or predictable scale, you graduate to Vertex AI, Google Cloud's managed platform for shipping AI.

This lesson is about that graduation: when to move, what actually changes, and how to make the decision without overthinking it.

Two doors into the same models

You already know the Gemini API on ai.google.dev. It gives you an API key, a generous free tier, and the fastest possible loop from idea to working call. This is sometimes called the

API
Application Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.
Voir la définition complète →
Gemini Developer API
.

Vertex AI is the second door into the *same* Gemini models (Pro, Flash, and the rest), but wrapped in Google Cloud's machinery: IAM (Identity and Access Management), VPC networking, regional endpoints, logging, and quota management. Same model intelligence, very different operational surface.

Here is the key mental model: you are not switching models, you are switching the building the model lives in. AI Studio is a workshop. Vertex AI is a regulated factory floor.

The code difference is smaller than you might fear. Same SDK, different configuration:

python
from google import genai

# Developer API: just a key
dev = genai.Client(api_key="YOUR_API_KEY")

# Vertex AI: project + region, no key (uses Google Cloud auth)
prod = genai.Client(
    vertexai=True,
    project="my-gcp-project",
    location="us-central1",
)

response = prod.models.generate_content(
    model="gemini-2.5-flash",
    contents="Summarize this support ticket in one sentence.",
)
print(response.text)

Notice what disappeared: the APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → key. On Vertex, identity comes from Google Cloud credentials (a service account or your own gcloud login), not a string you paste into code. That single change is the heart of why enterprises move.

What actually changes when you move

1. Authentication and access control

On the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète →, an APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → key is a bearer tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète →: whoever holds it can use it. That is fine for a prototype, dangerous for production.

Vertex uses IAM. You grant a service account (a non-human identity for your app) a specific role like roles/aiplatform.user. Access is scoped, revocable, and logged per identity. You can answer "who called Gemini, when, and from where" because every request flows through Cloud Audit Logs.

bash
# Grant a service account permission to call Vertex AI models
gcloud projects add-iam-policy-binding my-gcp-project \
  --member="serviceAccount:app@my-gcp-project.iam.gserviceaccount.com" \
  --role="roles/aiplatform.user"

2. Data residency and the data governancedata governanceData governance is the set of policies, roles, and processes that ensure data is accurate, secure, well-defined, and used responsibly across an organization.Voir la définition complète → contract

This is the reason regulated industries (healthcare, finance, public sector) often cannot use the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → at all. Vertex lets you pin processing to a region (the location in the code above), so data can stay in, say, the EU. It also gives you the enterprise data governanceenterprise data governanceData governance is the set of policies, roles, and processes that ensure data is accurate, secure, well-defined, and used responsibly across an organization.Voir la définition complète → terms most legal teams require: your prompts and outputs are not used to train Google's models, and you get contractual commitments around it. See cloud.google.com/vertex-ai for the current governance details.

3. Networking and isolation

Vertex AI endpoints can sit inside your VPC (Virtual Private Cloud) using Private Service Connect, so traffic to Gemini never traverses the public internet. Combined with VPC Service Controls, you build a perimeter that prevents data from leaking out even if a credential is compromised.

4. Quotas, scale, and provisioned throughput

The free tier and pay-as-you-go limits on the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → are designed for building. Vertex gives you proper quota management and an option called Provisioned Throughput: you reserve dedicated capacity so a traffic spike does not get you rate-limited at the worst moment. You trade some flexibility for guaranteed, predictable performance. For a customer-facing app at scale, that predictability is the product.

5. Grounding and enterprise RAG

You already understand RAG conceptually. Vertex operationalizes it. Grounding with Google Search is available on both doors, but Vertex adds Vertex AI Search and grounding against *your own* data stores: connect a corpus of internal documents and Gemini answers from them with citations, managed as a service instead of plumbing you maintain. This is the production-grade version of the RAG you prototyped earlier in this path.

When to move (and when not to)

Do not move just because "production" sounds serious. The Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → runs real workloads fine. Move when one of these is true:

  • A compliance or legal requirement demands data residency, audit logs, or contractual data terms.
  • You need IAM-grade access control instead of shared APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → keys.
  • You require predictable scale (provisioned throughput, formal SLAs, quota guarantees).
  • You are already on Google Cloud and want unified billing, monitoring, and networking.
  • You need managed RAG or MLOps (model evaluation, deployment pipelines, monitoring of quality drift).

Stay on the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → when you are prototyping, building an internal tool with low stakes, shipping a side project, or moving fast and the governance overhead would just slow you down.

Gemini on Vertex AI vs the Gemini API

Watch on YouTube

A concrete decision example

A mid-sized health insurer builds an internal assistant that answers employee questions about claims policy. The team prototypes it in AI Studio in an afternoon: paste the policy PDFs, wire up grounding, ship a Gem to a few colleagues. It works beautifully.

Then they decide to roll it out to 4,000 staff and connect it to live claims data. Now the questions change:

  • Claims data includes member health information. Can it leave the EU? No. → Vertex with an EU region.
  • Who can query the system, and can we prove it? → IAM roles plus Cloud Audit Logs.
  • What happens during Monday morning peak load? → Provisioned Throughput so the assistant does not rate-limit during the rush.
  • Where does the policy corpus live? → Vertex AI Search, managed, with citations, instead of a hand-rolled vector storevector storeA vector database stores data as high-dimensional numeric vectors (embeddings) and retrieves items by similarity rather than exact matches, powering semantic search and AI applications.Voir la définition complète → someone has to babysit.

None of those needs were visible during the prototype. All of them are non-negotiable at rollout. That is the migration trigger: not the model, but the *obligations* around the model. The afternoon prototype and the production system run the *same* gemini-2.5-flash. Only the building changed.

Vérification des acquis

1. According to the lesson's core mental model, what is the fundamental difference between the Gemini Developer API and Vertex AI?

2. Why does the lesson describe the disappearance of the API key as 'the heart of why enterprises move' to Vertex AI?

3. A team is building a quick prototype and wants the fastest possible loop from idea to a working Gemini call. Which path does the lesson recommend, and why?

CHOIX MULTIPLES

4. Select ALL of the operational capabilities the lesson associates with moving to Vertex AI.

Sélectionnez toutes les réponses correctes.

CHOIX MULTIPLES

5. Select ALL statements that correctly reflect what changes (and what doesn't) when migrating code from the Developer API to Vertex AI.

Sélectionnez toutes les réponses correctes.

How this connects to the rest of the Gemini stack

Vertex is not a separate universe. It is the production tier under the tools you have already met:

  • Agent Development Kit (ADK): the agents you build with ADK can be developed locally and then deployed to Vertex AI Agent Engine, a managed runtime that handles sessions, scaling, and state for you. Same agent code, production hosting.
  • Gemini Code Assist and the Gemini CLI stay in your developer workflow regardless of which door you ship through. They help you write the deployment code; they are not part of the runtime.
  • Apps Script and Gemini in Workspace are a different layer entirely: they live inside Docs, Gmail, and Sheets for end-user productivity. They are not where you host a scaled application. Do not confuse "Gemini helping me write an email" with "Gemini serving 4,000 employees through a governed endpoint."

A clean way to hold it: AI Studio and the Developer API are for building. Workspace and Gems are for using. Vertex AI is for operating at scale under rules.

The migration is mostly configuration, not rewrite

Because the SDK is shared, porting a working prototype is usually small. The real work is the surrounding Cloud setup, not the AI logic.

A minimal production-shaped config looks like this:

yaml
# app config: same model, production posture
model: gemini-2.5-flash
vertex:
  project: my-gcp-project
  location: europe-west4        # EU data residency
  use_provisioned_throughput: true
grounding:
  datastore: claims-policy-corpus   # Vertex AI Search
  include_citations: true
auth:
  service_account: app@my-gcp-project.iam.gserviceaccount.com

Your prompt engineeringprompt engineeringPrompt engineering is the practice of designing and refining text inputs to guide large language models toward accurate, relevant, and reliable outputs.Voir la définition complète →, your tool definitions, your model choice: all carry over. What you add is identity, region, capacity, and governance. That asymmetry is the good news. Time spent making your prototype excellent is not wasted when you move; the intelligence transfers untouched.

One honest caveat

Vertex AI adds operational weight: Google Cloud projects, IAM, billing setup, networking decisions. For a slightly technical professional this is a real step up in complexity, and it is genuinely overkill for many projects. The mistake is moving too early "to be safe" and drowning in cloud configuration before you have validated that anyone wants the product. Validate on the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète →. Migrate when an obligation, not an ambition, forces your hand.

Key Takeaways

  • Same models, different building. Vertex AI serves the identical Gemini models as the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète →; you switch the SDK config (vertexai=True, plus project and location), not your prompts or logic.
  • Move for obligations, not vibes. The trigger to migrate is a concrete need: data residency, IAM access control, audit logs, predictable scale, or managed RAG. If none apply, stay on the Developer APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → and keep moving fast.

À faire, tiré de cette leçon

Ces actions sont compilées dans le plan d'action du rôle.

  • Match the surface to the stakes: AI Studio, API, Gems, then Vertex AI
Voir le plan d'action complet →

Précédent

Files, embeddings, and RAG with Google

Retour au parcours
  • Identity replaces the API key. On Vertex, access flows through service accounts and IAM roles, which makes "who did what" auditable and revocable, the thing regulated teams require.
  • Region is a first-class decision. Set location to keep processing inside a jurisdiction, and pair it with VPC Service Controls and Provisioned Throughput for a true production posture.
  • Your prototype is not throwaway. Because intelligence transfers untouched, invest in getting prompts, grounding, and agent logic right on the simple APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète → first, then migrate when the rules demand it.