Vertex AI SDK (Python)

1.142.0 · active · verified Tue Mar 24

Google Cloud Vertex AI SDK for Python. Two separate PyPI packages exist: google-cloud-aiplatform (GAPIC clients, full Vertex AI platform) and vertexai (higher-level SDK, same underlying package). Install is google-cloud-aiplatform, import is vertexai — classic name mismatch. Generative AI modules (vertexai.generative_models, vertexai.language_models, etc.) deprecated June 24, 2025 and will be removed June 24, 2026. Current version: google-cloud-aiplatform 1.142.0 / vertexai 1.71.1.

Warnings

Install

Imports

Quickstart

Vertex AI Gemini call using google-genai with vertexai=True (recommended path from 2025 onwards).

# For Vertex AI generative AI — use google-genai
# pip install google-genai
from google import genai

client = genai.Client(
    vertexai=True,
    project='your-gcp-project-id',
    location='us-central1'
)

response = client.models.generate_content(
    model='gemini-2.5-flash',
    contents='What is Vertex AI?'
)
print(response.text)

view raw JSON →