Use Google Vertex AI

Connect Google Vertex AI as a model provider with a service account key file, a project and a location.

For: Administrators (the admin ability) · Last updated

Google Vertex AI runs Gemini models, and Claude models, inside your own Google Cloud project. You add it in Settings, Administration, Model Providers like any other provider (see Adding a model provider): select Add a provider and choose the type Google Vertex AI. You need the admin ability.

Before you start#

In Google Cloud, create a service account in the project you want to use, give it the Vertex AI User role, and download a JSON key for it. For Claude models, also enable them for the project in Vertex AI Model Garden.

Fields#

Field What to enter
Service account key The whole contents of the JSON key file. It is encrypted and never shown again.
Project ID Optional. Leave it blank to use the project the key file belongs to.
Location The Vertex AI region requests are sent to, for example us-central1, or global.

The product accepts only a service account key (its type is service_account). A person's login file or any other credential type is refused with a message that does not quote the file. A key file whose token address (token_uri) is not Google's own, https://oauth2.googleapis.com/token, is refused; every key file Google issues has it. The Key column shows the service account's email, masked.

Add provider stays unavailable until the key and the location are filled in.

Models#

Vertex AI has no service that lists models, so the product offers the Gemini models, the Claude models and the embedding models it knows for Vertex AI, with their published limits and prices. A model your project cannot use fails on the first call that uses it, with Google's reason. A newer model is offered once the product's model list includes it.

Test#

Test asks Google for an access token with the service account key. That confirms the key is valid and not disabled. It does not check which models your project may use, and sends no model request. A failure reads "Google rejected the service account key" or "could not reach Google to verify the service account".

Edit#

Select Edit, change the project or location, and select Save changes. Leave Service account key blank to keep the stored key; paste a new key file to replace it. When you paste a new key file and leave Project ID blank, the project becomes the new file's own project.

The stored key, project and location are the only ones used. Google environment variables set on the server, such as GOOGLE_APPLICATION_CREDENTIALS or VERTEXAI_PROJECT, are ignored. If VERTEXAI_API_BASE or VERTEX_API_BASE is set on the server, requests to this provider are refused until you unset it, because it would redirect them to another address.