Skip to content

Commit caf4c4f

Browse files
katlyn-edwardscopybara-github
authored andcommitted
docs: update documentation links from ai.google.dev to aistudio.google.com.
The Gemini API docs and API reference moved to aistudio.google.com/docs and aistudio.google.com/api-reference. PiperOrigin-RevId: 1017653911
1 parent be55690 commit caf4c4f

5 files changed

Lines changed: 22 additions & 25 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
Google Gen AI Python SDK provides an interface for developers to integrate
1212
Google's generative models into their Python applications. It supports
13-
the [Gemini Developer API](https://ai.google.dev/gemini-api/docs) and
13+
the [Gemini Developer API](https://aistudio.google.com/docs) and
1414
[Gemini Enterprise Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform)
1515
APIs.
1616

@@ -64,7 +64,7 @@ from google.genai import types
6464
## Create a client
6565

6666
Please run one of the following code blocks to create a client for
67-
different services ([Gemini Developer API](https://ai.google.dev/gemini-api/docs) or [Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform)).
67+
different services ([Gemini Developer API](https://aistudio.google.com/docs) or [Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform)).
6868

6969
```python
7070
from google import genai
@@ -655,7 +655,7 @@ available in generate_content's config parameter. For example, increasing
655655
`max_output_tokens` is essential for longer model responses. Capabilities and parameter defaults
656656
for each model is shown in the
657657
[Gemini Enterprise Agent Platform docs](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/google-models)
658-
and [Gemini API docs](https://ai.google.dev/gemini-api/docs/models)
658+
and [Gemini API docs](https://aistudio.google.com/docs/models)
659659
respectively. Note that all API methods support Pydantic types and
660660
dictionaries, which you can access from `google.genai.types`. In this example,
661661
we use `GenerateContentConfig` to specify the desired behavior from the model.
@@ -1678,7 +1678,7 @@ print(response.text)
16781678

16791679
The Interactions API is a unified interface for interacting with Gemini models and agents. It simplifies state management, tool orchestration, and long-running tasks.
16801680

1681-
See the [documentation site](https://ai.google.dev/gemini-api/docs/interactions) for more details.
1681+
See the [documentation site](https://aistudio.google.com/docs/interactions-overview) for more details.
16821682

16831683
### Basic Interaction
16841684

@@ -2196,7 +2196,7 @@ experimental backend features that are not yet formally supported in the SDK.
21962196
The structure of the dictionary must match the backend API's request structure.
21972197

21982198
- Gemini Enterprise Agent Platform backend API docs: https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest
2199-
- Gemini API backend API docs: https://ai.google.dev/api/rest
2199+
- Gemini API backend API docs: https://aistudio.google.com/api-reference
22002200

22012201
```python
22022202
response = client.models.generate_content(

‎google/genai/_api_client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ def __init__(
11251125
raise ValueError(
11261126
'No API key was provided. Please pass a valid API key. Learn how to'
11271127
' create an API key at'
1128-
' https://ai.google.dev/gemini-api/docs/api-key.'
1128+
' https://aistudio.google.com/docs/api-key.'
11291129
)
11301130
self._http_options.base_url = 'https://generativelanguage.googleapis.com/'
11311131
env_api_version = os.environ.get('GOOGLE_GENAI_API_VERSION', None)

‎google/genai/client.py‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,13 @@ class Client:
306306
`GOOGLE_CLOUD_LOCATION` environment variables.
307307
308308
Attributes:
309-
api_key: The `API key <https://ai.google.dev/gemini-api/docs/api-key>`_ to
310-
use for authentication. Applies to the Gemini Developer API only.
309+
api_key: The `API key <https://aistudio.google.com/docs/api-key>`_ to use
310+
for authentication. Applies to the Gemini Developer API only.
311311
enterprise (bool): Indicates whether the client should use the Gemini
312-
Enterprise Agent Platform endpoints (previously Vertex AI API).
313-
Defaults to False (uses Gemini Developer API endpoints). When
314-
`enterprise` and `vertexai` are both set, and they have conflicting
315-
values, a `ValueError` will be raised.
312+
Enterprise Agent Platform endpoints (previously Vertex AI API). Defaults
313+
to False (uses Gemini Developer API endpoints). When `enterprise` and
314+
`vertexai` are both set, and they have conflicting values, a `ValueError`
315+
will be raised.
316316
vertexai (bool): Legacy flag for `enterprise`.
317317
credentials: The credentials to use for authentication when calling the
318318
Gemini Enterprise Agent Platform APIs. Credentials can be obtained from
@@ -323,8 +323,8 @@ class Client:
323323
project: The `Google Cloud project ID
324324
<https://cloud.google.com/vertex-ai/docs/start/cloud-environment>`_ to use
325325
for quota. Can be obtained from environment variables (for example,
326-
``GOOGLE_CLOUD_PROJECT``). Applies to the Vertex AI API only.
327-
Find your `Google Cloud project ID
326+
``GOOGLE_CLOUD_PROJECT``). Applies to the Vertex AI API only. Find your
327+
`Google Cloud project ID
328328
<https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects>`_.
329329
location: The `location
330330
<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/locations>`_
@@ -376,9 +376,8 @@ def __init__(
376376
`enterprise` and `vertexai` are both set, and they have conflicting
377377
values, a `ValueError` will be raised.
378378
vertexai (bool): Legacy flag for `enterprise`.
379-
api_key (str): The `API key
380-
<https://ai.google.dev/gemini-api/docs/api-key>`_ to use for
381-
authentication. Applies to the Gemini Developer API only.
379+
api_key (str): The `API key <https://aistudio.google.com/docs/api-key>`_
380+
to use for authentication. Applies to the Gemini Developer API only.
382381
credentials (google.auth.credentials.Credentials): The credentials to use
383382
for authentication when calling the Vertex AI APIs. Credentials can be
384383
obtained from environment variables and default credentials. For more

‎google/genai/models.py‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6300,8 +6300,7 @@ def generate_content_stream(
63006300
'The generate_images method is deprecated and will be removed in the '
63016301
'next major release (not before Jan. 1 2027). Please use the '
63026302
'generate_content method with image models instead. '
6303-
'See https://ai.google.dev/gemini-api/docs/deprecations#imagen-models'
6304-
' and '
6303+
'See https://aistudio.google.com/docs/deprecations#imagen-models and '
63056304
'https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/image-generation#generate-images',
63066305
)
63076306
def generate_images(
@@ -8752,8 +8751,7 @@ async def list(
87528751
'The generate_images method is deprecated and will be removed in the '
87538752
'next major release (not before Jan. 1 2027). Please use the '
87548753
'generate_content method with image models instead. '
8755-
'See https://ai.google.dev/gemini-api/docs/deprecations#imagen-models'
8756-
' and '
8754+
'See https://aistudio.google.com/docs/deprecations#imagen-models and '
87578755
'https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/capabilities/image-generation#generate-images',
87588756
)
87598757
async def generate_images(

‎google/genai/types.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,7 +2750,7 @@ class HttpOptions(_common.BaseModel):
27502750
description="""Extra parameters to add to the request body.
27512751
The structure must match the backend API's request structure.
27522752
- Gemini Enterprise Agent Platform backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
2753-
- GeminiAPI backend API docs: https://ai.google.dev/api/rest""",
2753+
- GeminiAPI backend API docs: https://aistudio.google.com/api-reference""",
27542754
)
27552755
retry_options: Optional[HttpRetryOptions] = Field(
27562756
default=None, description="""HTTP retry options for the request."""
@@ -2798,7 +2798,7 @@ class HttpOptionsDict(TypedDict, total=False):
27982798
"""Extra parameters to add to the request body.
27992799
The structure must match the backend API's request structure.
28002800
- Gemini Enterprise Agent Platform backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
2801-
- GeminiAPI backend API docs: https://ai.google.dev/api/rest"""
2801+
- GeminiAPI backend API docs: https://aistudio.google.com/api-reference"""
28022802

28032803
retry_options: Optional[HttpRetryOptionsDict]
28042804
"""HTTP retry options for the request."""
@@ -22892,7 +22892,7 @@ class LiveConnectConstraints(_common.BaseModel):
2289222892
default=None,
2289322893
description="""ID of the model to configure in the ephemeral token for Live API.
2289422894
For a list of models, see `Gemini models
22895-
<https://ai.google.dev/gemini-api/docs/models>`.""",
22895+
<https://aistudio.google.com/docs/models>`.""",
2289622896
)
2289722897
config: Optional[LiveConnectConfig] = Field(
2289822898
default=None,
@@ -22906,7 +22906,7 @@ class LiveConnectConstraintsDict(TypedDict, total=False):
2290622906
model: Optional[str]
2290722907
"""ID of the model to configure in the ephemeral token for Live API.
2290822908
For a list of models, see `Gemini models
22909-
<https://ai.google.dev/gemini-api/docs/models>`."""
22909+
<https://aistudio.google.com/docs/models>`."""
2291022910

2291122911
config: Optional[LiveConnectConfigDict]
2291222912
"""Configuration specific to Live API connections created using this token."""

0 commit comments

Comments
 (0)