OptionalapiThe API Key, required for Gemini API clients.
OptionalapiOptional. The API version to use.
OptionalenterpriseOptional. Determines whether to use the Vertex AI or the Gemini API.
When true, the Gemini Enterprise Agent Platform API will used. When false, the Gemini API will be used. When both enterprise and vertexai are set, and they have different values, an Error will be thrown.
If unset, default SDK behavior is to use the Gemini API service.
OptionalgoogleOptional. 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.
OptionalhttpOptional. A set of customizable configuration for HTTP requests.
OptionallocationOptional. The Google Cloud project location for Vertex AI clients.
OptionalprojectOptional. The Google Cloud project ID for Vertex AI clients.
Find your project ID: https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects
OptionalvertexaiOptional. Determines whether to use the Vertex AI (now Gemini Enterprise Agent Platform) or the Gemini API.
The enterprise flag is recommended instead.
When true, the Vertex AI API will used. When false, the Gemini API will be used. When both enterprise and vertexai are set, and they have different values, an Error will be thrown.
If unset, default SDK behavior is to use the Gemini API service.
Google Gen AI SDK's configuration options.
See GoogleGenAI for usage samples.