OptionalapiA Google Cloud API key, instead of OAuth: sent as the x-goog-api-key header, as @google/genai sends it in Vertex
mode. Never beside another credential. Without a project it takes Google's global route; with one, the regional
route (Gemini Live only).
Optionalauth_Optionalauth_Optionalclient_Optionalclient_Optionalclient_OptionalkeyOptionalliveGemini Live only: the API version in the Live socket's path (v1 when unset), such as v1beta1. Lower-cased when
read.
OptionalliveGemini Live only: the host of the Live socket, instead of the one the location picks. Given as a host name, with an
optional port, bare or as an https:// or wss:// URL with nothing after the host; kept as host[:port], lower
case. The socket is always TLS. Only the platform's environment key may name one (AssertVertexLiveHostAllowed).
OptionallocationGCP Location/Region (default: 'us-central1'; none for an API key on Google's global route)
Optionalprivate_Optionalprivate_GCP Project ID (required; empty for an API key on Google's global route, whose key names its own project)
Optionalproject_OptionalserviceOptionaltoken_Optionaltype
Credentials format for Vertex AI authentication
This interface supports four authentication methods:
Or a Google Cloud API key (
apiKey), sent asx-goog-api-keyinstead of an OAuth bearer, never beside another credential. Alone, it is@google/genai's API-key mode: Google's global endpoint, with the model's short name and the project the key belongs to. With aproject(and alocation,us-central1by default), Gemini Live takes the regional route instead: the location's host and the model's fullprojects/…/locations/…name. The SDK has no regional API-key mode, soVertexLLMuses the global route with either shape.