@google/genai 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -102,6 +102,33 @@ const ai = new GoogleGenAI({
102
102
  });
103
103
  ```
104
104
 
105
+ ## API Selection
106
+
107
+ By default, the SDK uses the beta API endpoints provided by Google to support
108
+ preview features in the APIs. The stable API endpoints can be selected by
109
+ setting the API version to `v1`.
110
+
111
+ To set the API version use `apiVersion`. For example, to set the API version to
112
+ `v1` for Vertex AI:
113
+
114
+ ```typescript
115
+ const ai = new GoogleGenAI({
116
+ vertexai: true,
117
+ project: 'your_project',
118
+ location: 'your_location',
119
+ apiVersion: 'v1'
120
+ });
121
+ ```
122
+
123
+ To set the API version to `v1alpha` for the Gemini Developer API:
124
+
125
+ ```typescript
126
+ const ai = new GoogleGenAI({
127
+ apiKey: 'GEMINI_API_KEY',
128
+ apiVersion: 'v1alpha'
129
+ });
130
+ ```
131
+
105
132
  ## GoogleGenAI overview
106
133
 
107
134
  All API features are accessed through an instance of the `GoogleGenAI` classes.
@@ -128,7 +155,6 @@ The submodules bundle together related API methods:
128
155
  More samples can be found in the
129
156
  [github samples directory](https://github.com/googleapis/js-genai/tree/main/sdk-samples).
130
157
 
131
-
132
158
  ### Streaming
133
159
 
134
160
  For quicker, more responsive API interactions use the `generateContentStream`