Member Junction
    Preparing search index...

    Credentials format for Vertex AI authentication

    This interface supports four authentication methods:

    1. Application Default Credentials (ADC) - Just provide project and location
    2. Service Account JSON String - Provide serviceAccountJson with full JSON as string
    3. Service Account JSON Inline - Provide full service account fields directly
    4. Key File Path - Provide path to service account JSON file

    Or a Google Cloud API key (apiKey), sent as x-goog-api-key instead 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 a project (and a location, us-central1 by default), Gemini Live takes the regional route instead: the location's host and the model's full projects/…/locations/… name. The SDK has no regional API-key mode, so VertexLLM uses the global route with either shape.

    interface VertexAICredentials {
        apiKey?: string;
        auth_provider_x509_cert_url?: string;
        auth_uri?: string;
        client_email?: string;
        client_id?: string;
        client_x509_cert_url?: string;
        keyFilePath?: string;
        liveApiVersion?: string;
        liveHost?: string;
        location?: string;
        private_key?: string;
        private_key_id?: string;
        project: string;
        project_id?: string;
        serviceAccountJson?: string;
        token_uri?: string;
        type?: "service_account";
    }
    Index

    Properties

    apiKey?: string

    A 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).

    auth_provider_x509_cert_url?: string
    auth_uri?: string
    client_email?: string
    client_id?: string
    client_x509_cert_url?: string
    keyFilePath?: string
    liveApiVersion?: string

    Gemini Live only: the API version in the Live socket's path (v1 when unset), such as v1beta1. Lower-cased when read.

    liveHost?: string

    Gemini 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).

    location?: string

    GCP Location/Region (default: 'us-central1'; none for an API key on Google's global route)

    private_key?: string
    private_key_id?: string
    project: string

    GCP Project ID (required; empty for an API key on Google's global route, whose key names its own project)

    project_id?: string
    serviceAccountJson?: string
    token_uri?: string
    type?: "service_account"