Interface GoogleGenAIOptions

Google Gen AI SDK's configuration options.

See GoogleGenAI for usage samples.

interface GoogleGenAIOptions {
    apiKey?: string;
    apiVersion?: string;
    googleAuthOptions?: GoogleAuthOptions<JSONClient>;
    httpOptions?: HttpOptions;
    location?: string;
    project?: string;
    vertexai?: boolean;
}

Properties

apiKey?: string

The API Key, required for Gemini API clients.

Required on browser runtimes.

apiVersion?: string

Optional. The API version to use.

If unset, the default API version will be used.

googleAuthOptions?: GoogleAuthOptions<JSONClient>

Optional. Authentication options defined by the by google-auth-library for Vertex AI clients.

GoogleAuthOptions interface in google-auth-library-nodejs.

Only supported on Node runtimes, ignored on browser runtimes.

httpOptions?: HttpOptions

Optional. A set of customizable configuration for HTTP requests.

location?: string

Optional. The Google Cloud project region for Vertex AI clients.

Only supported on Node runtimes, ignored on browser runtimes.

project?: string

Optional. The Google Cloud project ID for Vertex AI clients.

Only supported on Node runtimes, ignored on browser runtimes.

vertexai?: boolean

Optional. Determines whether to use the Vertex AI or the Gemini API.

When true, the Vertex AI API will used. When false, the Gemini API will be used.

If unset, default SDK behavior is to use the Gemini API service.

MMNEPVFCICPMFPCPTTAAATR