google-cloud-vertexai overview (1.40.0)
Key Reference Links
VertexAI API Description: Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
| VertexAI API Product Reference | GitHub Repository | Maven artifact |
Getting Started
In order to use this library, you first need to go through the following steps:
- Install a JDK (Java Development Kit)
- Select or create a Cloud Platform project
- Enable billing for your project
- Enable the API
- Set up authentication
Use the VertexAI API for Java
To ensure that your project uses compatible versions of the librariesand their component artifacts, importcom.google.cloud:libraries-bom and usethe BOM to specify dependency versions. Be sure to remove any versions that youset previously. For more information aboutBOMs, seeGoogle Cloud Platform Libraries BOM.
Maven
Import the BOM in thedependencyManagement section of yourpom.xml file.Include specific artifacts you depend on in thedependencies section, but don'tspecify the artifacts' versions in thedependencies section.
The example below demonstrates how you would import the BOM and include thegoogle-cloud-vertexai artifact.
<dependencyManagement><dependencies><dependency><groupId>com.google.cloud</groupId><artifactId>libraries-bom</artifactId><version>26.72.0</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><dependencies><dependency><groupId>com.google.cloud</groupId><artifactId>google-cloud-vertexai</artifactId></dependency></dependencies>
Gradle
BOMs are supported by default in Gradle 5.x or later. Add aplatformdependency oncom.google.cloud:libraries-bom and remove the version from thedependency declarations in the artifact'sbuild.gradle file.
The example below demonstrates how you would import the BOM and include thegoogle-cloud-vertexai artifact.
implementation(platform("com.google.cloud:libraries-bom:26.72.0"))implementation("com.google.cloud:google-cloud-vertexai")
Theplatform andenforcedPlatform keywords supply dependency versionsdeclared in a BOM. TheenforcedPlatform keyword enforces the dependencyversions declared in the BOM and thus overrides what you specified.
For more details of theplatform andenforcedPlatform keywords Gradle 5.x or higher, seeGradle: Importing Maven BOMs.
If you're using Gradle 4.6 or later, addenableFeaturePreview('IMPROVED_POM_SUPPORT') to yoursettings.gradle file. For details, seeGradle 4.6 Release Notes: BOM import.Versions of Gradle earlier than 4.6 don't support BOMs.
SBT
SBTdoesn't support BOMs. You can findrecommended versions of libraries from a particular BOM version on thedashboardand set the versions manually.To use the latest version of this library, add this to your dependencies:
libraryDependencies+="com.google.cloud"%"google-cloud-vertexai"%"1.40.0"
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-19 UTC.